ovirtsdk4.writers

    1# -*- coding: utf-8 -*-
    2
    3#
    4# Copyright (c) 2016 Red Hat, Inc.
    5#
    6# Licensed under the Apache License, Version 2.0 (the "License");
    7# you may not use this file except in compliance with the License.
    8# You may obtain a copy of the License at
    9#
   10#   http://www.apache.org/licenses/LICENSE-2.0
   11#
   12# Unless required by applicable law or agreed to in writing, software
   13# distributed under the License is distributed on an "AS IS" BASIS,
   14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   15# See the License for the specific language governing permissions and
   16# limitations under the License.
   17#
   18
   19
   20from ovirtsdk4 import List
   21from ovirtsdk4 import types
   22from ovirtsdk4.writer import Writer
   23
   24
   25class ActionWriter(Writer):
   26
   27    def __init__(self):
   28        super(ActionWriter, self).__init__()
   29
   30    @staticmethod
   31    def write_one(obj, writer, singular=None):
   32        if singular is None:
   33            singular = 'action'
   34        writer.write_start(singular)
   35        href = obj.href
   36        if href is not None:
   37            writer.write_attribute('href', href)
   38        if obj.id is not None:
   39            writer.write_attribute('id', obj.id)
   40        if obj.activate is not None:
   41            Writer.write_boolean(writer, 'activate', obj.activate)
   42        if obj.allow_partial_import is not None:
   43            Writer.write_boolean(writer, 'allow_partial_import', obj.allow_partial_import)
   44        if obj.async_ is not None:
   45            Writer.write_boolean(writer, 'async', obj.async_)
   46        if obj.attachment is not None:
   47            DiskAttachmentWriter.write_one(obj.attachment, writer, 'attachment')
   48        if obj.authorized_key is not None:
   49            AuthorizedKeyWriter.write_one(obj.authorized_key, writer, 'authorized_key')
   50        if obj.auto_pinning_policy is not None:
   51            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
   52        if obj.bricks is not None:
   53            GlusterBrickWriter.write_many(obj.bricks, writer, 'brick', 'bricks')
   54        if obj.certificates is not None:
   55            CertificateWriter.write_many(obj.certificates, writer, 'certificate', 'certificates')
   56        if obj.check_connectivity is not None:
   57            Writer.write_boolean(writer, 'check_connectivity', obj.check_connectivity)
   58        if obj.clone is not None:
   59            Writer.write_boolean(writer, 'clone', obj.clone)
   60        if obj.clone_permissions is not None:
   61            Writer.write_boolean(writer, 'clone_permissions', obj.clone_permissions)
   62        if obj.cluster is not None:
   63            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
   64        if obj.collapse_snapshots is not None:
   65            Writer.write_boolean(writer, 'collapse_snapshots', obj.collapse_snapshots)
   66        if obj.comment is not None:
   67            Writer.write_string(writer, 'comment', obj.comment)
   68        if obj.commit_on_success is not None:
   69            Writer.write_boolean(writer, 'commit_on_success', obj.commit_on_success)
   70        if obj.connection is not None:
   71            StorageConnectionWriter.write_one(obj.connection, writer, 'connection')
   72        if obj.connectivity_timeout is not None:
   73            Writer.write_integer(writer, 'connectivity_timeout', obj.connectivity_timeout)
   74        if obj.correlation_id is not None:
   75            Writer.write_string(writer, 'correlation_id', obj.correlation_id)
   76        if obj.data_center is not None:
   77            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
   78        if obj.deploy_hosted_engine is not None:
   79            Writer.write_boolean(writer, 'deploy_hosted_engine', obj.deploy_hosted_engine)
   80        if obj.description is not None:
   81            Writer.write_string(writer, 'description', obj.description)
   82        if obj.details is not None:
   83            GlusterVolumeProfileDetailsWriter.write_one(obj.details, writer, 'details')
   84        if obj.directory is not None:
   85            Writer.write_string(writer, 'directory', obj.directory)
   86        if obj.discard_snapshots is not None:
   87            Writer.write_boolean(writer, 'discard_snapshots', obj.discard_snapshots)
   88        if obj.discovered_targets is not None:
   89            IscsiDetailsWriter.write_many(obj.discovered_targets, writer, 'iscsi_details', 'discovered_targets')
   90        if obj.disk is not None:
   91            DiskWriter.write_one(obj.disk, writer, 'disk')
   92        if obj.disk_profile is not None:
   93            DiskProfileWriter.write_one(obj.disk_profile, writer, 'disk_profile')
   94        if obj.disks is not None:
   95            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
   96        if obj.exclusive is not None:
   97            Writer.write_boolean(writer, 'exclusive', obj.exclusive)
   98        if obj.fault is not None:
   99            FaultWriter.write_one(obj.fault, writer, 'fault')
  100        if obj.fence_type is not None:
  101            Writer.write_string(writer, 'fence_type', obj.fence_type)
  102        if obj.filename is not None:
  103            Writer.write_string(writer, 'filename', obj.filename)
  104        if obj.filter is not None:
  105            Writer.write_boolean(writer, 'filter', obj.filter)
  106        if obj.fix_layout is not None:
  107            Writer.write_boolean(writer, 'fix_layout', obj.fix_layout)
  108        if obj.follow is not None:
  109            Writer.write_string(writer, 'follow', obj.follow)
  110        if obj.force is not None:
  111            Writer.write_boolean(writer, 'force', obj.force)
  112        if obj.grace_period is not None:
  113            GracePeriodWriter.write_one(obj.grace_period, writer, 'grace_period')
  114        if obj.host is not None:
  115            HostWriter.write_one(obj.host, writer, 'host')
  116        if obj.image is not None:
  117            Writer.write_string(writer, 'image', obj.image)
  118        if obj.image_transfer is not None:
  119            ImageTransferWriter.write_one(obj.image_transfer, writer, 'image_transfer')
  120        if obj.import_as_template is not None:
  121            Writer.write_boolean(writer, 'import_as_template', obj.import_as_template)
  122        if obj.is_attached is not None:
  123            Writer.write_boolean(writer, 'is_attached', obj.is_attached)
  124        if obj.iscsi is not None:
  125            IscsiDetailsWriter.write_one(obj.iscsi, writer, 'iscsi')
  126        if obj.iscsi_targets is not None:
  127            writer.write_start('iscsi_targets')
  128            for item in obj.iscsi_targets:
  129                if item is not None:
  130                    Writer.write_string(writer, 'iscsi_target', item)
  131            writer.write_end()
  132        if obj.job is not None:
  133            JobWriter.write_one(obj.job, writer, 'job')
  134        if obj.lease is not None:
  135            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
  136        if obj.logical_units is not None:
  137            LogicalUnitWriter.write_many(obj.logical_units, writer, 'logical_unit', 'logical_units')
  138        if obj.maintenance_after_restart is not None:
  139            Writer.write_boolean(writer, 'maintenance_after_restart', obj.maintenance_after_restart)
  140        if obj.maintenance_enabled is not None:
  141            Writer.write_boolean(writer, 'maintenance_enabled', obj.maintenance_enabled)
  142        if obj.migrate_vms_in_affinity_closure is not None:
  143            Writer.write_boolean(writer, 'migrate_vms_in_affinity_closure', obj.migrate_vms_in_affinity_closure)
  144        if obj.modified_bonds is not None:
  145            HostNicWriter.write_many(obj.modified_bonds, writer, 'host_nic', 'modified_bonds')
  146        if obj.modified_labels is not None:
  147            NetworkLabelWriter.write_many(obj.modified_labels, writer, 'network_label', 'modified_labels')
  148        if obj.modified_network_attachments is not None:
  149            NetworkAttachmentWriter.write_many(obj.modified_network_attachments, writer, 'network_attachment', 'modified_network_attachments')
  150        if obj.name is not None:
  151            Writer.write_string(writer, 'name', obj.name)
  152        if obj.optimize_cpu_settings is not None:
  153            Writer.write_boolean(writer, 'optimize_cpu_settings', obj.optimize_cpu_settings)
  154        if obj.option is not None:
  155            OptionWriter.write_one(obj.option, writer, 'option')
  156        if obj.pause is not None:
  157            Writer.write_boolean(writer, 'pause', obj.pause)
  158        if obj.permission is not None:
  159            PermissionWriter.write_one(obj.permission, writer, 'permission')
  160        if obj.power_management is not None:
  161            PowerManagementWriter.write_one(obj.power_management, writer, 'power_management')
  162        if obj.proxy_ticket is not None:
  163            ProxyTicketWriter.write_one(obj.proxy_ticket, writer, 'proxy_ticket')
  164        if obj.quota is not None:
  165            QuotaWriter.write_one(obj.quota, writer, 'quota')
  166        if obj.reason is not None:
  167            Writer.write_string(writer, 'reason', obj.reason)
  168        if obj.reassign_bad_macs is not None:
  169            Writer.write_boolean(writer, 'reassign_bad_macs', obj.reassign_bad_macs)
  170        if obj.reboot is not None:
  171            Writer.write_boolean(writer, 'reboot', obj.reboot)
  172        if obj.registration_configuration is not None:
  173            RegistrationConfigurationWriter.write_one(obj.registration_configuration, writer, 'registration_configuration')
  174        if obj.remote_viewer_connection_file is not None:
  175            Writer.write_string(writer, 'remote_viewer_connection_file', obj.remote_viewer_connection_file)
  176        if obj.removed_bonds is not None:
  177            HostNicWriter.write_many(obj.removed_bonds, writer, 'host_nic', 'removed_bonds')
  178        if obj.removed_labels is not None:
  179            NetworkLabelWriter.write_many(obj.removed_labels, writer, 'network_label', 'removed_labels')
  180        if obj.removed_network_attachments is not None:
  181            NetworkAttachmentWriter.write_many(obj.removed_network_attachments, writer, 'network_attachment', 'removed_network_attachments')
  182        if obj.resolution_type is not None:
  183            Writer.write_string(writer, 'resolution_type', obj.resolution_type)
  184        if obj.restore_memory is not None:
  185            Writer.write_boolean(writer, 'restore_memory', obj.restore_memory)
  186        if obj.root_password is not None:
  187            Writer.write_string(writer, 'root_password', obj.root_password)
  188        if obj.seal is not None:
  189            Writer.write_boolean(writer, 'seal', obj.seal)
  190        if obj.snapshot is not None:
  191            SnapshotWriter.write_one(obj.snapshot, writer, 'snapshot')
  192        if obj.source_host is not None:
  193            HostWriter.write_one(obj.source_host, writer, 'source_host')
  194        if obj.ssh is not None:
  195            SshWriter.write_one(obj.ssh, writer, 'ssh')
  196        if obj.status is not None:
  197            Writer.write_string(writer, 'status', obj.status)
  198        if obj.stop_gluster_service is not None:
  199            Writer.write_boolean(writer, 'stop_gluster_service', obj.stop_gluster_service)
  200        if obj.storage_domain is not None:
  201            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
  202        if obj.storage_domains is not None:
  203            StorageDomainWriter.write_many(obj.storage_domains, writer, 'storage_domain', 'storage_domains')
  204        if obj.succeeded is not None:
  205            Writer.write_boolean(writer, 'succeeded', obj.succeeded)
  206        if obj.synchronized_network_attachments is not None:
  207            NetworkAttachmentWriter.write_many(obj.synchronized_network_attachments, writer, 'network_attachment', 'synchronized_network_attachments')
  208        if obj.template is not None:
  209            TemplateWriter.write_one(obj.template, writer, 'template')
  210        if obj.ticket is not None:
  211            TicketWriter.write_one(obj.ticket, writer, 'ticket')
  212        if obj.timeout is not None:
  213            Writer.write_integer(writer, 'timeout', obj.timeout)
  214        if obj.undeploy_hosted_engine is not None:
  215            Writer.write_boolean(writer, 'undeploy_hosted_engine', obj.undeploy_hosted_engine)
  216        if obj.upgrade_action is not None:
  217            Writer.write_string(writer, 'upgrade_action', obj.upgrade_action.value)
  218        if obj.upgrade_percent_complete is not None:
  219            Writer.write_integer(writer, 'upgrade_percent_complete', obj.upgrade_percent_complete)
  220        if obj.use_cloud_init is not None:
  221            Writer.write_boolean(writer, 'use_cloud_init', obj.use_cloud_init)
  222        if obj.use_ignition is not None:
  223            Writer.write_boolean(writer, 'use_ignition', obj.use_ignition)
  224        if obj.use_initialization is not None:
  225            Writer.write_boolean(writer, 'use_initialization', obj.use_initialization)
  226        if obj.use_sysprep is not None:
  227            Writer.write_boolean(writer, 'use_sysprep', obj.use_sysprep)
  228        if obj.virtual_functions_configuration is not None:
  229            HostNicVirtualFunctionsConfigurationWriter.write_one(obj.virtual_functions_configuration, writer, 'virtual_functions_configuration')
  230        if obj.vm is not None:
  231            VmWriter.write_one(obj.vm, writer, 'vm')
  232        if obj.vnic_profile_mappings is not None:
  233            VnicProfileMappingWriter.write_many(obj.vnic_profile_mappings, writer, 'vnic_profile_mapping', 'vnic_profile_mappings')
  234        if obj.volatile is not None:
  235            Writer.write_boolean(writer, 'volatile', obj.volatile)
  236        writer.write_end()
  237
  238    @staticmethod
  239    def write_many(objs, writer, singular=None, plural=None):
  240        if singular is None:
  241            singular = 'action'
  242        if plural is None:
  243            plural = 'actions'
  244        writer.write_start(plural)
  245        if type(objs) == List:
  246            href = objs.href
  247            if href is not None:
  248                writer.write_attribute('href', href)
  249        for obj in objs:
  250            ActionWriter.write_one(obj, writer, singular)
  251        writer.write_end()
  252
  253
  254class AffinityGroupWriter(Writer):
  255
  256    def __init__(self):
  257        super(AffinityGroupWriter, self).__init__()
  258
  259    @staticmethod
  260    def write_one(obj, writer, singular=None):
  261        if singular is None:
  262            singular = 'affinity_group'
  263        writer.write_start(singular)
  264        href = obj.href
  265        if href is not None:
  266            writer.write_attribute('href', href)
  267        if obj.id is not None:
  268            writer.write_attribute('id', obj.id)
  269        if obj.broken is not None:
  270            Writer.write_boolean(writer, 'broken', obj.broken)
  271        if obj.comment is not None:
  272            Writer.write_string(writer, 'comment', obj.comment)
  273        if obj.description is not None:
  274            Writer.write_string(writer, 'description', obj.description)
  275        if obj.enforcing is not None:
  276            Writer.write_boolean(writer, 'enforcing', obj.enforcing)
  277        if obj.hosts_rule is not None:
  278            AffinityRuleWriter.write_one(obj.hosts_rule, writer, 'hosts_rule')
  279        if obj.name is not None:
  280            Writer.write_string(writer, 'name', obj.name)
  281        if obj.positive is not None:
  282            Writer.write_boolean(writer, 'positive', obj.positive)
  283        if obj.priority is not None:
  284            Writer.write_decimal(writer, 'priority', obj.priority)
  285        if obj.vms_rule is not None:
  286            AffinityRuleWriter.write_one(obj.vms_rule, writer, 'vms_rule')
  287        if obj.cluster is not None:
  288            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
  289        if obj.host_labels is not None:
  290            AffinityLabelWriter.write_many(obj.host_labels, writer, 'affinity_label', 'host_labels')
  291        if obj.hosts is not None:
  292            HostWriter.write_many(obj.hosts, writer, 'host', 'hosts')
  293        if obj.vm_labels is not None:
  294            AffinityLabelWriter.write_many(obj.vm_labels, writer, 'affinity_label', 'vm_labels')
  295        if obj.vms is not None:
  296            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
  297        writer.write_end()
  298
  299    @staticmethod
  300    def write_many(objs, writer, singular=None, plural=None):
  301        if singular is None:
  302            singular = 'affinity_group'
  303        if plural is None:
  304            plural = 'affinity_groups'
  305        writer.write_start(plural)
  306        if type(objs) == List:
  307            href = objs.href
  308            if href is not None:
  309                writer.write_attribute('href', href)
  310        for obj in objs:
  311            AffinityGroupWriter.write_one(obj, writer, singular)
  312        writer.write_end()
  313
  314
  315class AffinityLabelWriter(Writer):
  316
  317    def __init__(self):
  318        super(AffinityLabelWriter, self).__init__()
  319
  320    @staticmethod
  321    def write_one(obj, writer, singular=None):
  322        if singular is None:
  323            singular = 'affinity_label'
  324        writer.write_start(singular)
  325        href = obj.href
  326        if href is not None:
  327            writer.write_attribute('href', href)
  328        if obj.id is not None:
  329            writer.write_attribute('id', obj.id)
  330        if obj.comment is not None:
  331            Writer.write_string(writer, 'comment', obj.comment)
  332        if obj.description is not None:
  333            Writer.write_string(writer, 'description', obj.description)
  334        if obj.has_implicit_affinity_group is not None:
  335            Writer.write_boolean(writer, 'has_implicit_affinity_group', obj.has_implicit_affinity_group)
  336        if obj.name is not None:
  337            Writer.write_string(writer, 'name', obj.name)
  338        if obj.read_only is not None:
  339            Writer.write_boolean(writer, 'read_only', obj.read_only)
  340        if obj.hosts is not None:
  341            HostWriter.write_many(obj.hosts, writer, 'host', 'hosts')
  342        if obj.vms is not None:
  343            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
  344        writer.write_end()
  345
  346    @staticmethod
  347    def write_many(objs, writer, singular=None, plural=None):
  348        if singular is None:
  349            singular = 'affinity_label'
  350        if plural is None:
  351            plural = 'affinity_labels'
  352        writer.write_start(plural)
  353        if type(objs) == List:
  354            href = objs.href
  355            if href is not None:
  356                writer.write_attribute('href', href)
  357        for obj in objs:
  358            AffinityLabelWriter.write_one(obj, writer, singular)
  359        writer.write_end()
  360
  361
  362class AffinityRuleWriter(Writer):
  363
  364    def __init__(self):
  365        super(AffinityRuleWriter, self).__init__()
  366
  367    @staticmethod
  368    def write_one(obj, writer, singular=None):
  369        if singular is None:
  370            singular = 'affinity_rule'
  371        writer.write_start(singular)
  372        href = obj.href
  373        if href is not None:
  374            writer.write_attribute('href', href)
  375        if obj.enabled is not None:
  376            Writer.write_boolean(writer, 'enabled', obj.enabled)
  377        if obj.enforcing is not None:
  378            Writer.write_boolean(writer, 'enforcing', obj.enforcing)
  379        if obj.positive is not None:
  380            Writer.write_boolean(writer, 'positive', obj.positive)
  381        writer.write_end()
  382
  383    @staticmethod
  384    def write_many(objs, writer, singular=None, plural=None):
  385        if singular is None:
  386            singular = 'affinity_rule'
  387        if plural is None:
  388            plural = 'affinity_rules'
  389        writer.write_start(plural)
  390        if type(objs) == List:
  391            href = objs.href
  392            if href is not None:
  393                writer.write_attribute('href', href)
  394        for obj in objs:
  395            AffinityRuleWriter.write_one(obj, writer, singular)
  396        writer.write_end()
  397
  398
  399class AgentWriter(Writer):
  400
  401    def __init__(self):
  402        super(AgentWriter, self).__init__()
  403
  404    @staticmethod
  405    def write_one(obj, writer, singular=None):
  406        if singular is None:
  407            singular = 'agent'
  408        writer.write_start(singular)
  409        href = obj.href
  410        if href is not None:
  411            writer.write_attribute('href', href)
  412        if obj.id is not None:
  413            writer.write_attribute('id', obj.id)
  414        if obj.address is not None:
  415            Writer.write_string(writer, 'address', obj.address)
  416        if obj.comment is not None:
  417            Writer.write_string(writer, 'comment', obj.comment)
  418        if obj.concurrent is not None:
  419            Writer.write_boolean(writer, 'concurrent', obj.concurrent)
  420        if obj.description is not None:
  421            Writer.write_string(writer, 'description', obj.description)
  422        if obj.encrypt_options is not None:
  423            Writer.write_boolean(writer, 'encrypt_options', obj.encrypt_options)
  424        if obj.name is not None:
  425            Writer.write_string(writer, 'name', obj.name)
  426        if obj.options is not None:
  427            OptionWriter.write_many(obj.options, writer, 'option', 'options')
  428        if obj.order is not None:
  429            Writer.write_integer(writer, 'order', obj.order)
  430        if obj.password is not None:
  431            Writer.write_string(writer, 'password', obj.password)
  432        if obj.port is not None:
  433            Writer.write_integer(writer, 'port', obj.port)
  434        if obj.type is not None:
  435            Writer.write_string(writer, 'type', obj.type)
  436        if obj.username is not None:
  437            Writer.write_string(writer, 'username', obj.username)
  438        if obj.host is not None:
  439            HostWriter.write_one(obj.host, writer, 'host')
  440        writer.write_end()
  441
  442    @staticmethod
  443    def write_many(objs, writer, singular=None, plural=None):
  444        if singular is None:
  445            singular = 'agent'
  446        if plural is None:
  447            plural = 'agents'
  448        writer.write_start(plural)
  449        if type(objs) == List:
  450            href = objs.href
  451            if href is not None:
  452                writer.write_attribute('href', href)
  453        for obj in objs:
  454            AgentWriter.write_one(obj, writer, singular)
  455        writer.write_end()
  456
  457
  458class AgentConfigurationWriter(Writer):
  459
  460    def __init__(self):
  461        super(AgentConfigurationWriter, self).__init__()
  462
  463    @staticmethod
  464    def write_one(obj, writer, singular=None):
  465        if singular is None:
  466            singular = 'agent_configuration'
  467        writer.write_start(singular)
  468        href = obj.href
  469        if href is not None:
  470            writer.write_attribute('href', href)
  471        if obj.address is not None:
  472            Writer.write_string(writer, 'address', obj.address)
  473        if obj.broker_type is not None:
  474            Writer.write_string(writer, 'broker_type', obj.broker_type.value)
  475        if obj.network_mappings is not None:
  476            Writer.write_string(writer, 'network_mappings', obj.network_mappings)
  477        if obj.password is not None:
  478            Writer.write_string(writer, 'password', obj.password)
  479        if obj.port is not None:
  480            Writer.write_integer(writer, 'port', obj.port)
  481        if obj.username is not None:
  482            Writer.write_string(writer, 'username', obj.username)
  483        writer.write_end()
  484
  485    @staticmethod
  486    def write_many(objs, writer, singular=None, plural=None):
  487        if singular is None:
  488            singular = 'agent_configuration'
  489        if plural is None:
  490            plural = 'agent_configurations'
  491        writer.write_start(plural)
  492        if type(objs) == List:
  493            href = objs.href
  494            if href is not None:
  495                writer.write_attribute('href', href)
  496        for obj in objs:
  497            AgentConfigurationWriter.write_one(obj, writer, singular)
  498        writer.write_end()
  499
  500
  501class ApiWriter(Writer):
  502
  503    def __init__(self):
  504        super(ApiWriter, self).__init__()
  505
  506    @staticmethod
  507    def write_one(obj, writer, singular=None):
  508        if singular is None:
  509            singular = 'api'
  510        writer.write_start(singular)
  511        href = obj.href
  512        if href is not None:
  513            writer.write_attribute('href', href)
  514        if obj.product_info is not None:
  515            ProductInfoWriter.write_one(obj.product_info, writer, 'product_info')
  516        if obj.special_objects is not None:
  517            SpecialObjectsWriter.write_one(obj.special_objects, writer, 'special_objects')
  518        if obj.summary is not None:
  519            ApiSummaryWriter.write_one(obj.summary, writer, 'summary')
  520        if obj.time is not None:
  521            Writer.write_date(writer, 'time', obj.time)
  522        if obj.authenticated_user is not None:
  523            UserWriter.write_one(obj.authenticated_user, writer, 'authenticated_user')
  524        if obj.effective_user is not None:
  525            UserWriter.write_one(obj.effective_user, writer, 'effective_user')
  526        writer.write_end()
  527
  528    @staticmethod
  529    def write_many(objs, writer, singular=None, plural=None):
  530        if singular is None:
  531            singular = 'api'
  532        if plural is None:
  533            plural = 'apis'
  534        writer.write_start(plural)
  535        if type(objs) == List:
  536            href = objs.href
  537            if href is not None:
  538                writer.write_attribute('href', href)
  539        for obj in objs:
  540            ApiWriter.write_one(obj, writer, singular)
  541        writer.write_end()
  542
  543
  544class ApiSummaryWriter(Writer):
  545
  546    def __init__(self):
  547        super(ApiSummaryWriter, self).__init__()
  548
  549    @staticmethod
  550    def write_one(obj, writer, singular=None):
  551        if singular is None:
  552            singular = 'api_summary'
  553        writer.write_start(singular)
  554        href = obj.href
  555        if href is not None:
  556            writer.write_attribute('href', href)
  557        if obj.hosts is not None:
  558            ApiSummaryItemWriter.write_one(obj.hosts, writer, 'hosts')
  559        if obj.storage_domains is not None:
  560            ApiSummaryItemWriter.write_one(obj.storage_domains, writer, 'storage_domains')
  561        if obj.users is not None:
  562            ApiSummaryItemWriter.write_one(obj.users, writer, 'users')
  563        if obj.vms is not None:
  564            ApiSummaryItemWriter.write_one(obj.vms, writer, 'vms')
  565        writer.write_end()
  566
  567    @staticmethod
  568    def write_many(objs, writer, singular=None, plural=None):
  569        if singular is None:
  570            singular = 'api_summary'
  571        if plural is None:
  572            plural = 'api_summaries'
  573        writer.write_start(plural)
  574        if type(objs) == List:
  575            href = objs.href
  576            if href is not None:
  577                writer.write_attribute('href', href)
  578        for obj in objs:
  579            ApiSummaryWriter.write_one(obj, writer, singular)
  580        writer.write_end()
  581
  582
  583class ApiSummaryItemWriter(Writer):
  584
  585    def __init__(self):
  586        super(ApiSummaryItemWriter, self).__init__()
  587
  588    @staticmethod
  589    def write_one(obj, writer, singular=None):
  590        if singular is None:
  591            singular = 'api_summary_item'
  592        writer.write_start(singular)
  593        href = obj.href
  594        if href is not None:
  595            writer.write_attribute('href', href)
  596        if obj.active is not None:
  597            Writer.write_integer(writer, 'active', obj.active)
  598        if obj.total is not None:
  599            Writer.write_integer(writer, 'total', obj.total)
  600        writer.write_end()
  601
  602    @staticmethod
  603    def write_many(objs, writer, singular=None, plural=None):
  604        if singular is None:
  605            singular = 'api_summary_item'
  606        if plural is None:
  607            plural = 'api_summary_items'
  608        writer.write_start(plural)
  609        if type(objs) == List:
  610            href = objs.href
  611            if href is not None:
  612                writer.write_attribute('href', href)
  613        for obj in objs:
  614            ApiSummaryItemWriter.write_one(obj, writer, singular)
  615        writer.write_end()
  616
  617
  618class ApplicationWriter(Writer):
  619
  620    def __init__(self):
  621        super(ApplicationWriter, self).__init__()
  622
  623    @staticmethod
  624    def write_one(obj, writer, singular=None):
  625        if singular is None:
  626            singular = 'application'
  627        writer.write_start(singular)
  628        href = obj.href
  629        if href is not None:
  630            writer.write_attribute('href', href)
  631        if obj.id is not None:
  632            writer.write_attribute('id', obj.id)
  633        if obj.comment is not None:
  634            Writer.write_string(writer, 'comment', obj.comment)
  635        if obj.description is not None:
  636            Writer.write_string(writer, 'description', obj.description)
  637        if obj.name is not None:
  638            Writer.write_string(writer, 'name', obj.name)
  639        if obj.vm is not None:
  640            VmWriter.write_one(obj.vm, writer, 'vm')
  641        writer.write_end()
  642
  643    @staticmethod
  644    def write_many(objs, writer, singular=None, plural=None):
  645        if singular is None:
  646            singular = 'application'
  647        if plural is None:
  648            plural = 'applications'
  649        writer.write_start(plural)
  650        if type(objs) == List:
  651            href = objs.href
  652            if href is not None:
  653                writer.write_attribute('href', href)
  654        for obj in objs:
  655            ApplicationWriter.write_one(obj, writer, singular)
  656        writer.write_end()
  657
  658
  659class AuthorizedKeyWriter(Writer):
  660
  661    def __init__(self):
  662        super(AuthorizedKeyWriter, self).__init__()
  663
  664    @staticmethod
  665    def write_one(obj, writer, singular=None):
  666        if singular is None:
  667            singular = 'authorized_key'
  668        writer.write_start(singular)
  669        href = obj.href
  670        if href is not None:
  671            writer.write_attribute('href', href)
  672        if obj.id is not None:
  673            writer.write_attribute('id', obj.id)
  674        if obj.comment is not None:
  675            Writer.write_string(writer, 'comment', obj.comment)
  676        if obj.description is not None:
  677            Writer.write_string(writer, 'description', obj.description)
  678        if obj.key is not None:
  679            Writer.write_string(writer, 'key', obj.key)
  680        if obj.name is not None:
  681            Writer.write_string(writer, 'name', obj.name)
  682        if obj.user is not None:
  683            UserWriter.write_one(obj.user, writer, 'user')
  684        writer.write_end()
  685
  686    @staticmethod
  687    def write_many(objs, writer, singular=None, plural=None):
  688        if singular is None:
  689            singular = 'authorized_key'
  690        if plural is None:
  691            plural = 'authorized_keys'
  692        writer.write_start(plural)
  693        if type(objs) == List:
  694            href = objs.href
  695            if href is not None:
  696                writer.write_attribute('href', href)
  697        for obj in objs:
  698            AuthorizedKeyWriter.write_one(obj, writer, singular)
  699        writer.write_end()
  700
  701
  702class BackupWriter(Writer):
  703
  704    def __init__(self):
  705        super(BackupWriter, self).__init__()
  706
  707    @staticmethod
  708    def write_one(obj, writer, singular=None):
  709        if singular is None:
  710            singular = 'backup'
  711        writer.write_start(singular)
  712        href = obj.href
  713        if href is not None:
  714            writer.write_attribute('href', href)
  715        if obj.id is not None:
  716            writer.write_attribute('id', obj.id)
  717        if obj.comment is not None:
  718            Writer.write_string(writer, 'comment', obj.comment)
  719        if obj.creation_date is not None:
  720            Writer.write_date(writer, 'creation_date', obj.creation_date)
  721        if obj.description is not None:
  722            Writer.write_string(writer, 'description', obj.description)
  723        if obj.from_checkpoint_id is not None:
  724            Writer.write_string(writer, 'from_checkpoint_id', obj.from_checkpoint_id)
  725        if obj.modification_date is not None:
  726            Writer.write_date(writer, 'modification_date', obj.modification_date)
  727        if obj.name is not None:
  728            Writer.write_string(writer, 'name', obj.name)
  729        if obj.phase is not None:
  730            Writer.write_string(writer, 'phase', obj.phase.value)
  731        if obj.to_checkpoint_id is not None:
  732            Writer.write_string(writer, 'to_checkpoint_id', obj.to_checkpoint_id)
  733        if obj.disks is not None:
  734            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
  735        if obj.host is not None:
  736            HostWriter.write_one(obj.host, writer, 'host')
  737        if obj.snapshot is not None:
  738            SnapshotWriter.write_one(obj.snapshot, writer, 'snapshot')
  739        if obj.vm is not None:
  740            VmWriter.write_one(obj.vm, writer, 'vm')
  741        writer.write_end()
  742
  743    @staticmethod
  744    def write_many(objs, writer, singular=None, plural=None):
  745        if singular is None:
  746            singular = 'backup'
  747        if plural is None:
  748            plural = 'backups'
  749        writer.write_start(plural)
  750        if type(objs) == List:
  751            href = objs.href
  752            if href is not None:
  753                writer.write_attribute('href', href)
  754        for obj in objs:
  755            BackupWriter.write_one(obj, writer, singular)
  756        writer.write_end()
  757
  758
  759class BalanceWriter(Writer):
  760
  761    def __init__(self):
  762        super(BalanceWriter, self).__init__()
  763
  764    @staticmethod
  765    def write_one(obj, writer, singular=None):
  766        if singular is None:
  767            singular = 'balance'
  768        writer.write_start(singular)
  769        href = obj.href
  770        if href is not None:
  771            writer.write_attribute('href', href)
  772        if obj.id is not None:
  773            writer.write_attribute('id', obj.id)
  774        if obj.comment is not None:
  775            Writer.write_string(writer, 'comment', obj.comment)
  776        if obj.description is not None:
  777            Writer.write_string(writer, 'description', obj.description)
  778        if obj.name is not None:
  779            Writer.write_string(writer, 'name', obj.name)
  780        if obj.scheduling_policy is not None:
  781            SchedulingPolicyWriter.write_one(obj.scheduling_policy, writer, 'scheduling_policy')
  782        if obj.scheduling_policy_unit is not None:
  783            SchedulingPolicyUnitWriter.write_one(obj.scheduling_policy_unit, writer, 'scheduling_policy_unit')
  784        writer.write_end()
  785
  786    @staticmethod
  787    def write_many(objs, writer, singular=None, plural=None):
  788        if singular is None:
  789            singular = 'balance'
  790        if plural is None:
  791            plural = 'balances'
  792        writer.write_start(plural)
  793        if type(objs) == List:
  794            href = objs.href
  795            if href is not None:
  796                writer.write_attribute('href', href)
  797        for obj in objs:
  798            BalanceWriter.write_one(obj, writer, singular)
  799        writer.write_end()
  800
  801
  802class BiosWriter(Writer):
  803
  804    def __init__(self):
  805        super(BiosWriter, self).__init__()
  806
  807    @staticmethod
  808    def write_one(obj, writer, singular=None):
  809        if singular is None:
  810            singular = 'bios'
  811        writer.write_start(singular)
  812        href = obj.href
  813        if href is not None:
  814            writer.write_attribute('href', href)
  815        if obj.boot_menu is not None:
  816            BootMenuWriter.write_one(obj.boot_menu, writer, 'boot_menu')
  817        if obj.type is not None:
  818            Writer.write_string(writer, 'type', obj.type.value)
  819        writer.write_end()
  820
  821    @staticmethod
  822    def write_many(objs, writer, singular=None, plural=None):
  823        if singular is None:
  824            singular = 'bios'
  825        if plural is None:
  826            plural = 'bioss'
  827        writer.write_start(plural)
  828        if type(objs) == List:
  829            href = objs.href
  830            if href is not None:
  831                writer.write_attribute('href', href)
  832        for obj in objs:
  833            BiosWriter.write_one(obj, writer, singular)
  834        writer.write_end()
  835
  836
  837class BlockStatisticWriter(Writer):
  838
  839    def __init__(self):
  840        super(BlockStatisticWriter, self).__init__()
  841
  842    @staticmethod
  843    def write_one(obj, writer, singular=None):
  844        if singular is None:
  845            singular = 'block_statistic'
  846        writer.write_start(singular)
  847        href = obj.href
  848        if href is not None:
  849            writer.write_attribute('href', href)
  850        if obj.statistics is not None:
  851            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
  852        writer.write_end()
  853
  854    @staticmethod
  855    def write_many(objs, writer, singular=None, plural=None):
  856        if singular is None:
  857            singular = 'block_statistic'
  858        if plural is None:
  859            plural = 'block_statistics'
  860        writer.write_start(plural)
  861        if type(objs) == List:
  862            href = objs.href
  863            if href is not None:
  864                writer.write_attribute('href', href)
  865        for obj in objs:
  866            BlockStatisticWriter.write_one(obj, writer, singular)
  867        writer.write_end()
  868
  869
  870class BondingWriter(Writer):
  871
  872    def __init__(self):
  873        super(BondingWriter, self).__init__()
  874
  875    @staticmethod
  876    def write_one(obj, writer, singular=None):
  877        if singular is None:
  878            singular = 'bonding'
  879        writer.write_start(singular)
  880        href = obj.href
  881        if href is not None:
  882            writer.write_attribute('href', href)
  883        if obj.ad_partner_mac is not None:
  884            MacWriter.write_one(obj.ad_partner_mac, writer, 'ad_partner_mac')
  885        if obj.options is not None:
  886            OptionWriter.write_many(obj.options, writer, 'option', 'options')
  887        if obj.slaves is not None:
  888            HostNicWriter.write_many(obj.slaves, writer, 'host_nic', 'slaves')
  889        if obj.active_slave is not None:
  890            HostNicWriter.write_one(obj.active_slave, writer, 'active_slave')
  891        writer.write_end()
  892
  893    @staticmethod
  894    def write_many(objs, writer, singular=None, plural=None):
  895        if singular is None:
  896            singular = 'bonding'
  897        if plural is None:
  898            plural = 'bondings'
  899        writer.write_start(plural)
  900        if type(objs) == List:
  901            href = objs.href
  902            if href is not None:
  903                writer.write_attribute('href', href)
  904        for obj in objs:
  905            BondingWriter.write_one(obj, writer, singular)
  906        writer.write_end()
  907
  908
  909class BookmarkWriter(Writer):
  910
  911    def __init__(self):
  912        super(BookmarkWriter, self).__init__()
  913
  914    @staticmethod
  915    def write_one(obj, writer, singular=None):
  916        if singular is None:
  917            singular = 'bookmark'
  918        writer.write_start(singular)
  919        href = obj.href
  920        if href is not None:
  921            writer.write_attribute('href', href)
  922        if obj.id is not None:
  923            writer.write_attribute('id', obj.id)
  924        if obj.comment is not None:
  925            Writer.write_string(writer, 'comment', obj.comment)
  926        if obj.description is not None:
  927            Writer.write_string(writer, 'description', obj.description)
  928        if obj.name is not None:
  929            Writer.write_string(writer, 'name', obj.name)
  930        if obj.value is not None:
  931            Writer.write_string(writer, 'value', obj.value)
  932        writer.write_end()
  933
  934    @staticmethod
  935    def write_many(objs, writer, singular=None, plural=None):
  936        if singular is None:
  937            singular = 'bookmark'
  938        if plural is None:
  939            plural = 'bookmarks'
  940        writer.write_start(plural)
  941        if type(objs) == List:
  942            href = objs.href
  943            if href is not None:
  944                writer.write_attribute('href', href)
  945        for obj in objs:
  946            BookmarkWriter.write_one(obj, writer, singular)
  947        writer.write_end()
  948
  949
  950class BootWriter(Writer):
  951
  952    def __init__(self):
  953        super(BootWriter, self).__init__()
  954
  955    @staticmethod
  956    def write_one(obj, writer, singular=None):
  957        if singular is None:
  958            singular = 'boot'
  959        writer.write_start(singular)
  960        href = obj.href
  961        if href is not None:
  962            writer.write_attribute('href', href)
  963        if obj.devices is not None:
  964            writer.write_start('devices')
  965            for item in obj.devices:
  966                if item is not None:
  967                    Writer.write_string(writer, 'device', item.value)
  968            writer.write_end()
  969        writer.write_end()
  970
  971    @staticmethod
  972    def write_many(objs, writer, singular=None, plural=None):
  973        if singular is None:
  974            singular = 'boot'
  975        if plural is None:
  976            plural = 'boots'
  977        writer.write_start(plural)
  978        if type(objs) == List:
  979            href = objs.href
  980            if href is not None:
  981                writer.write_attribute('href', href)
  982        for obj in objs:
  983            BootWriter.write_one(obj, writer, singular)
  984        writer.write_end()
  985
  986
  987class BootMenuWriter(Writer):
  988
  989    def __init__(self):
  990        super(BootMenuWriter, self).__init__()
  991
  992    @staticmethod
  993    def write_one(obj, writer, singular=None):
  994        if singular is None:
  995            singular = 'boot_menu'
  996        writer.write_start(singular)
  997        href = obj.href
  998        if href is not None:
  999            writer.write_attribute('href', href)
 1000        if obj.enabled is not None:
 1001            Writer.write_boolean(writer, 'enabled', obj.enabled)
 1002        writer.write_end()
 1003
 1004    @staticmethod
 1005    def write_many(objs, writer, singular=None, plural=None):
 1006        if singular is None:
 1007            singular = 'boot_menu'
 1008        if plural is None:
 1009            plural = 'boot_menus'
 1010        writer.write_start(plural)
 1011        if type(objs) == List:
 1012            href = objs.href
 1013            if href is not None:
 1014                writer.write_attribute('href', href)
 1015        for obj in objs:
 1016            BootMenuWriter.write_one(obj, writer, singular)
 1017        writer.write_end()
 1018
 1019
 1020class BrickProfileDetailWriter(Writer):
 1021
 1022    def __init__(self):
 1023        super(BrickProfileDetailWriter, self).__init__()
 1024
 1025    @staticmethod
 1026    def write_one(obj, writer, singular=None):
 1027        if singular is None:
 1028            singular = 'brick_profile_detail'
 1029        writer.write_start(singular)
 1030        href = obj.href
 1031        if href is not None:
 1032            writer.write_attribute('href', href)
 1033        if obj.profile_details is not None:
 1034            ProfileDetailWriter.write_many(obj.profile_details, writer, 'profile_detail', 'profile_details')
 1035        if obj.brick is not None:
 1036            GlusterBrickWriter.write_one(obj.brick, writer, 'brick')
 1037        writer.write_end()
 1038
 1039    @staticmethod
 1040    def write_many(objs, writer, singular=None, plural=None):
 1041        if singular is None:
 1042            singular = 'brick_profile_detail'
 1043        if plural is None:
 1044            plural = 'brick_profile_details'
 1045        writer.write_start(plural)
 1046        if type(objs) == List:
 1047            href = objs.href
 1048            if href is not None:
 1049                writer.write_attribute('href', href)
 1050        for obj in objs:
 1051            BrickProfileDetailWriter.write_one(obj, writer, singular)
 1052        writer.write_end()
 1053
 1054
 1055class CdromWriter(Writer):
 1056
 1057    def __init__(self):
 1058        super(CdromWriter, self).__init__()
 1059
 1060    @staticmethod
 1061    def write_one(obj, writer, singular=None):
 1062        if singular is None:
 1063            singular = 'cdrom'
 1064        writer.write_start(singular)
 1065        href = obj.href
 1066        if href is not None:
 1067            writer.write_attribute('href', href)
 1068        if obj.id is not None:
 1069            writer.write_attribute('id', obj.id)
 1070        if obj.comment is not None:
 1071            Writer.write_string(writer, 'comment', obj.comment)
 1072        if obj.description is not None:
 1073            Writer.write_string(writer, 'description', obj.description)
 1074        if obj.file is not None:
 1075            FileWriter.write_one(obj.file, writer, 'file')
 1076        if obj.name is not None:
 1077            Writer.write_string(writer, 'name', obj.name)
 1078        if obj.instance_type is not None:
 1079            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
 1080        if obj.template is not None:
 1081            TemplateWriter.write_one(obj.template, writer, 'template')
 1082        if obj.vm is not None:
 1083            VmWriter.write_one(obj.vm, writer, 'vm')
 1084        if obj.vms is not None:
 1085            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
 1086        writer.write_end()
 1087
 1088    @staticmethod
 1089    def write_many(objs, writer, singular=None, plural=None):
 1090        if singular is None:
 1091            singular = 'cdrom'
 1092        if plural is None:
 1093            plural = 'cdroms'
 1094        writer.write_start(plural)
 1095        if type(objs) == List:
 1096            href = objs.href
 1097            if href is not None:
 1098                writer.write_attribute('href', href)
 1099        for obj in objs:
 1100            CdromWriter.write_one(obj, writer, singular)
 1101        writer.write_end()
 1102
 1103
 1104class CertificateWriter(Writer):
 1105
 1106    def __init__(self):
 1107        super(CertificateWriter, self).__init__()
 1108
 1109    @staticmethod
 1110    def write_one(obj, writer, singular=None):
 1111        if singular is None:
 1112            singular = 'certificate'
 1113        writer.write_start(singular)
 1114        href = obj.href
 1115        if href is not None:
 1116            writer.write_attribute('href', href)
 1117        if obj.id is not None:
 1118            writer.write_attribute('id', obj.id)
 1119        if obj.comment is not None:
 1120            Writer.write_string(writer, 'comment', obj.comment)
 1121        if obj.content is not None:
 1122            Writer.write_string(writer, 'content', obj.content)
 1123        if obj.description is not None:
 1124            Writer.write_string(writer, 'description', obj.description)
 1125        if obj.name is not None:
 1126            Writer.write_string(writer, 'name', obj.name)
 1127        if obj.organization is not None:
 1128            Writer.write_string(writer, 'organization', obj.organization)
 1129        if obj.subject is not None:
 1130            Writer.write_string(writer, 'subject', obj.subject)
 1131        writer.write_end()
 1132
 1133    @staticmethod
 1134    def write_many(objs, writer, singular=None, plural=None):
 1135        if singular is None:
 1136            singular = 'certificate'
 1137        if plural is None:
 1138            plural = 'certificates'
 1139        writer.write_start(plural)
 1140        if type(objs) == List:
 1141            href = objs.href
 1142            if href is not None:
 1143                writer.write_attribute('href', href)
 1144        for obj in objs:
 1145            CertificateWriter.write_one(obj, writer, singular)
 1146        writer.write_end()
 1147
 1148
 1149class CheckpointWriter(Writer):
 1150
 1151    def __init__(self):
 1152        super(CheckpointWriter, self).__init__()
 1153
 1154    @staticmethod
 1155    def write_one(obj, writer, singular=None):
 1156        if singular is None:
 1157            singular = 'checkpoint'
 1158        writer.write_start(singular)
 1159        href = obj.href
 1160        if href is not None:
 1161            writer.write_attribute('href', href)
 1162        if obj.id is not None:
 1163            writer.write_attribute('id', obj.id)
 1164        if obj.comment is not None:
 1165            Writer.write_string(writer, 'comment', obj.comment)
 1166        if obj.creation_date is not None:
 1167            Writer.write_date(writer, 'creation_date', obj.creation_date)
 1168        if obj.description is not None:
 1169            Writer.write_string(writer, 'description', obj.description)
 1170        if obj.name is not None:
 1171            Writer.write_string(writer, 'name', obj.name)
 1172        if obj.parent_id is not None:
 1173            Writer.write_string(writer, 'parent_id', obj.parent_id)
 1174        if obj.state is not None:
 1175            Writer.write_string(writer, 'state', obj.state.value)
 1176        if obj.disks is not None:
 1177            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
 1178        if obj.vm is not None:
 1179            VmWriter.write_one(obj.vm, writer, 'vm')
 1180        writer.write_end()
 1181
 1182    @staticmethod
 1183    def write_many(objs, writer, singular=None, plural=None):
 1184        if singular is None:
 1185            singular = 'checkpoint'
 1186        if plural is None:
 1187            plural = 'checkpoints'
 1188        writer.write_start(plural)
 1189        if type(objs) == List:
 1190            href = objs.href
 1191            if href is not None:
 1192                writer.write_attribute('href', href)
 1193        for obj in objs:
 1194            CheckpointWriter.write_one(obj, writer, singular)
 1195        writer.write_end()
 1196
 1197
 1198class CloudInitWriter(Writer):
 1199
 1200    def __init__(self):
 1201        super(CloudInitWriter, self).__init__()
 1202
 1203    @staticmethod
 1204    def write_one(obj, writer, singular=None):
 1205        if singular is None:
 1206            singular = 'cloud_init'
 1207        writer.write_start(singular)
 1208        href = obj.href
 1209        if href is not None:
 1210            writer.write_attribute('href', href)
 1211        if obj.authorized_keys is not None:
 1212            AuthorizedKeyWriter.write_many(obj.authorized_keys, writer, 'authorized_key', 'authorized_keys')
 1213        if obj.files is not None:
 1214            FileWriter.write_many(obj.files, writer, 'file', 'files')
 1215        if obj.host is not None:
 1216            HostWriter.write_one(obj.host, writer, 'host')
 1217        if obj.network_configuration is not None:
 1218            NetworkConfigurationWriter.write_one(obj.network_configuration, writer, 'network_configuration')
 1219        if obj.regenerate_ssh_keys is not None:
 1220            Writer.write_boolean(writer, 'regenerate_ssh_keys', obj.regenerate_ssh_keys)
 1221        if obj.timezone is not None:
 1222            Writer.write_string(writer, 'timezone', obj.timezone)
 1223        if obj.users is not None:
 1224            UserWriter.write_many(obj.users, writer, 'user', 'users')
 1225        writer.write_end()
 1226
 1227    @staticmethod
 1228    def write_many(objs, writer, singular=None, plural=None):
 1229        if singular is None:
 1230            singular = 'cloud_init'
 1231        if plural is None:
 1232            plural = 'cloud_inits'
 1233        writer.write_start(plural)
 1234        if type(objs) == List:
 1235            href = objs.href
 1236            if href is not None:
 1237                writer.write_attribute('href', href)
 1238        for obj in objs:
 1239            CloudInitWriter.write_one(obj, writer, singular)
 1240        writer.write_end()
 1241
 1242
 1243class ClusterWriter(Writer):
 1244
 1245    def __init__(self):
 1246        super(ClusterWriter, self).__init__()
 1247
 1248    @staticmethod
 1249    def write_one(obj, writer, singular=None):
 1250        if singular is None:
 1251            singular = 'cluster'
 1252        writer.write_start(singular)
 1253        href = obj.href
 1254        if href is not None:
 1255            writer.write_attribute('href', href)
 1256        if obj.id is not None:
 1257            writer.write_attribute('id', obj.id)
 1258        if obj.ballooning_enabled is not None:
 1259            Writer.write_boolean(writer, 'ballooning_enabled', obj.ballooning_enabled)
 1260        if obj.bios_type is not None:
 1261            Writer.write_string(writer, 'bios_type', obj.bios_type.value)
 1262        if obj.comment is not None:
 1263            Writer.write_string(writer, 'comment', obj.comment)
 1264        if obj.cpu is not None:
 1265            CpuWriter.write_one(obj.cpu, writer, 'cpu')
 1266        if obj.custom_scheduling_policy_properties is not None:
 1267            PropertyWriter.write_many(obj.custom_scheduling_policy_properties, writer, 'property', 'custom_scheduling_policy_properties')
 1268        if obj.description is not None:
 1269            Writer.write_string(writer, 'description', obj.description)
 1270        if obj.display is not None:
 1271            DisplayWriter.write_one(obj.display, writer, 'display')
 1272        if obj.error_handling is not None:
 1273            ErrorHandlingWriter.write_one(obj.error_handling, writer, 'error_handling')
 1274        if obj.fencing_policy is not None:
 1275            FencingPolicyWriter.write_one(obj.fencing_policy, writer, 'fencing_policy')
 1276        if obj.fips_mode is not None:
 1277            Writer.write_string(writer, 'fips_mode', obj.fips_mode.value)
 1278        if obj.firewall_type is not None:
 1279            Writer.write_string(writer, 'firewall_type', obj.firewall_type.value)
 1280        if obj.gluster_service is not None:
 1281            Writer.write_boolean(writer, 'gluster_service', obj.gluster_service)
 1282        if obj.gluster_tuned_profile is not None:
 1283            Writer.write_string(writer, 'gluster_tuned_profile', obj.gluster_tuned_profile)
 1284        if obj.ha_reservation is not None:
 1285            Writer.write_boolean(writer, 'ha_reservation', obj.ha_reservation)
 1286        if obj.ksm is not None:
 1287            KsmWriter.write_one(obj.ksm, writer, 'ksm')
 1288        if obj.log_max_memory_used_threshold is not None:
 1289            Writer.write_integer(writer, 'log_max_memory_used_threshold', obj.log_max_memory_used_threshold)
 1290        if obj.log_max_memory_used_threshold_type is not None:
 1291            Writer.write_string(writer, 'log_max_memory_used_threshold_type', obj.log_max_memory_used_threshold_type.value)
 1292        if obj.maintenance_reason_required is not None:
 1293            Writer.write_boolean(writer, 'maintenance_reason_required', obj.maintenance_reason_required)
 1294        if obj.memory_policy is not None:
 1295            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
 1296        if obj.migration is not None:
 1297            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
 1298        if obj.name is not None:
 1299            Writer.write_string(writer, 'name', obj.name)
 1300        if obj.optional_reason is not None:
 1301            Writer.write_boolean(writer, 'optional_reason', obj.optional_reason)
 1302        if obj.required_rng_sources is not None:
 1303            writer.write_start('required_rng_sources')
 1304            for item in obj.required_rng_sources:
 1305                if item is not None:
 1306                    Writer.write_string(writer, 'required_rng_source', item.value)
 1307            writer.write_end()
 1308        if obj.serial_number is not None:
 1309            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
 1310        if obj.supported_versions is not None:
 1311            VersionWriter.write_many(obj.supported_versions, writer, 'version', 'supported_versions')
 1312        if obj.switch_type is not None:
 1313            Writer.write_string(writer, 'switch_type', obj.switch_type.value)
 1314        if obj.threads_as_cores is not None:
 1315            Writer.write_boolean(writer, 'threads_as_cores', obj.threads_as_cores)
 1316        if obj.trusted_service is not None:
 1317            Writer.write_boolean(writer, 'trusted_service', obj.trusted_service)
 1318        if obj.tunnel_migration is not None:
 1319            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
 1320        if obj.upgrade_correlation_id is not None:
 1321            Writer.write_string(writer, 'upgrade_correlation_id', obj.upgrade_correlation_id)
 1322        if obj.upgrade_in_progress is not None:
 1323            Writer.write_boolean(writer, 'upgrade_in_progress', obj.upgrade_in_progress)
 1324        if obj.upgrade_percent_complete is not None:
 1325            Writer.write_integer(writer, 'upgrade_percent_complete', obj.upgrade_percent_complete)
 1326        if obj.version is not None:
 1327            VersionWriter.write_one(obj.version, writer, 'version')
 1328        if obj.virt_service is not None:
 1329            Writer.write_boolean(writer, 'virt_service', obj.virt_service)
 1330        if obj.vnc_encryption is not None:
 1331            Writer.write_boolean(writer, 'vnc_encryption', obj.vnc_encryption)
 1332        if obj.affinity_groups is not None:
 1333            AffinityGroupWriter.write_many(obj.affinity_groups, writer, 'affinity_group', 'affinity_groups')
 1334        if obj.cpu_profiles is not None:
 1335            CpuProfileWriter.write_many(obj.cpu_profiles, writer, 'cpu_profile', 'cpu_profiles')
 1336        if obj.data_center is not None:
 1337            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
 1338        if obj.enabled_features is not None:
 1339            ClusterFeatureWriter.write_many(obj.enabled_features, writer, 'cluster_feature', 'enabled_features')
 1340        if obj.external_network_providers is not None:
 1341            ExternalProviderWriter.write_many(obj.external_network_providers, writer, 'external_provider', 'external_network_providers')
 1342        if obj.gluster_hooks is not None:
 1343            GlusterHookWriter.write_many(obj.gluster_hooks, writer, 'gluster_hook', 'gluster_hooks')
 1344        if obj.gluster_volumes is not None:
 1345            GlusterVolumeWriter.write_many(obj.gluster_volumes, writer, 'gluster_volume', 'gluster_volumes')
 1346        if obj.mac_pool is not None:
 1347            MacPoolWriter.write_one(obj.mac_pool, writer, 'mac_pool')
 1348        if obj.management_network is not None:
 1349            NetworkWriter.write_one(obj.management_network, writer, 'management_network')
 1350        if obj.network_filters is not None:
 1351            NetworkFilterWriter.write_many(obj.network_filters, writer, 'network_filter', 'network_filters')
 1352        if obj.networks is not None:
 1353            NetworkWriter.write_many(obj.networks, writer, 'network', 'networks')
 1354        if obj.permissions is not None:
 1355            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 1356        if obj.scheduling_policy is not None:
 1357            SchedulingPolicyWriter.write_one(obj.scheduling_policy, writer, 'scheduling_policy')
 1358        writer.write_end()
 1359
 1360    @staticmethod
 1361    def write_many(objs, writer, singular=None, plural=None):
 1362        if singular is None:
 1363            singular = 'cluster'
 1364        if plural is None:
 1365            plural = 'clusters'
 1366        writer.write_start(plural)
 1367        if type(objs) == List:
 1368            href = objs.href
 1369            if href is not None:
 1370                writer.write_attribute('href', href)
 1371        for obj in objs:
 1372            ClusterWriter.write_one(obj, writer, singular)
 1373        writer.write_end()
 1374
 1375
 1376class ClusterFeatureWriter(Writer):
 1377
 1378    def __init__(self):
 1379        super(ClusterFeatureWriter, self).__init__()
 1380
 1381    @staticmethod
 1382    def write_one(obj, writer, singular=None):
 1383        if singular is None:
 1384            singular = 'cluster_feature'
 1385        writer.write_start(singular)
 1386        href = obj.href
 1387        if href is not None:
 1388            writer.write_attribute('href', href)
 1389        if obj.id is not None:
 1390            writer.write_attribute('id', obj.id)
 1391        if obj.comment is not None:
 1392            Writer.write_string(writer, 'comment', obj.comment)
 1393        if obj.description is not None:
 1394            Writer.write_string(writer, 'description', obj.description)
 1395        if obj.name is not None:
 1396            Writer.write_string(writer, 'name', obj.name)
 1397        if obj.cluster_level is not None:
 1398            ClusterLevelWriter.write_one(obj.cluster_level, writer, 'cluster_level')
 1399        writer.write_end()
 1400
 1401    @staticmethod
 1402    def write_many(objs, writer, singular=None, plural=None):
 1403        if singular is None:
 1404            singular = 'cluster_feature'
 1405        if plural is None:
 1406            plural = 'cluster_features'
 1407        writer.write_start(plural)
 1408        if type(objs) == List:
 1409            href = objs.href
 1410            if href is not None:
 1411                writer.write_attribute('href', href)
 1412        for obj in objs:
 1413            ClusterFeatureWriter.write_one(obj, writer, singular)
 1414        writer.write_end()
 1415
 1416
 1417class ClusterLevelWriter(Writer):
 1418
 1419    def __init__(self):
 1420        super(ClusterLevelWriter, self).__init__()
 1421
 1422    @staticmethod
 1423    def write_one(obj, writer, singular=None):
 1424        if singular is None:
 1425            singular = 'cluster_level'
 1426        writer.write_start(singular)
 1427        href = obj.href
 1428        if href is not None:
 1429            writer.write_attribute('href', href)
 1430        if obj.id is not None:
 1431            writer.write_attribute('id', obj.id)
 1432        if obj.comment is not None:
 1433            Writer.write_string(writer, 'comment', obj.comment)
 1434        if obj.cpu_types is not None:
 1435            CpuTypeWriter.write_many(obj.cpu_types, writer, 'cpu_type', 'cpu_types')
 1436        if obj.description is not None:
 1437            Writer.write_string(writer, 'description', obj.description)
 1438        if obj.name is not None:
 1439            Writer.write_string(writer, 'name', obj.name)
 1440        if obj.permits is not None:
 1441            PermitWriter.write_many(obj.permits, writer, 'permit', 'permits')
 1442        if obj.cluster_features is not None:
 1443            ClusterFeatureWriter.write_many(obj.cluster_features, writer, 'cluster_feature', 'cluster_features')
 1444        writer.write_end()
 1445
 1446    @staticmethod
 1447    def write_many(objs, writer, singular=None, plural=None):
 1448        if singular is None:
 1449            singular = 'cluster_level'
 1450        if plural is None:
 1451            plural = 'cluster_levels'
 1452        writer.write_start(plural)
 1453        if type(objs) == List:
 1454            href = objs.href
 1455            if href is not None:
 1456                writer.write_attribute('href', href)
 1457        for obj in objs:
 1458            ClusterLevelWriter.write_one(obj, writer, singular)
 1459        writer.write_end()
 1460
 1461
 1462class ConfigurationWriter(Writer):
 1463
 1464    def __init__(self):
 1465        super(ConfigurationWriter, self).__init__()
 1466
 1467    @staticmethod
 1468    def write_one(obj, writer, singular=None):
 1469        if singular is None:
 1470            singular = 'configuration'
 1471        writer.write_start(singular)
 1472        href = obj.href
 1473        if href is not None:
 1474            writer.write_attribute('href', href)
 1475        if obj.data is not None:
 1476            Writer.write_string(writer, 'data', obj.data)
 1477        if obj.type is not None:
 1478            Writer.write_string(writer, 'type', obj.type.value)
 1479        writer.write_end()
 1480
 1481    @staticmethod
 1482    def write_many(objs, writer, singular=None, plural=None):
 1483        if singular is None:
 1484            singular = 'configuration'
 1485        if plural is None:
 1486            plural = 'configurations'
 1487        writer.write_start(plural)
 1488        if type(objs) == List:
 1489            href = objs.href
 1490            if href is not None:
 1491                writer.write_attribute('href', href)
 1492        for obj in objs:
 1493            ConfigurationWriter.write_one(obj, writer, singular)
 1494        writer.write_end()
 1495
 1496
 1497class ConsoleWriter(Writer):
 1498
 1499    def __init__(self):
 1500        super(ConsoleWriter, self).__init__()
 1501
 1502    @staticmethod
 1503    def write_one(obj, writer, singular=None):
 1504        if singular is None:
 1505            singular = 'console'
 1506        writer.write_start(singular)
 1507        href = obj.href
 1508        if href is not None:
 1509            writer.write_attribute('href', href)
 1510        if obj.enabled is not None:
 1511            Writer.write_boolean(writer, 'enabled', obj.enabled)
 1512        writer.write_end()
 1513
 1514    @staticmethod
 1515    def write_many(objs, writer, singular=None, plural=None):
 1516        if singular is None:
 1517            singular = 'console'
 1518        if plural is None:
 1519            plural = 'consoles'
 1520        writer.write_start(plural)
 1521        if type(objs) == List:
 1522            href = objs.href
 1523            if href is not None:
 1524                writer.write_attribute('href', href)
 1525        for obj in objs:
 1526            ConsoleWriter.write_one(obj, writer, singular)
 1527        writer.write_end()
 1528
 1529
 1530class CoreWriter(Writer):
 1531
 1532    def __init__(self):
 1533        super(CoreWriter, self).__init__()
 1534
 1535    @staticmethod
 1536    def write_one(obj, writer, singular=None):
 1537        if singular is None:
 1538            singular = 'core'
 1539        writer.write_start(singular)
 1540        href = obj.href
 1541        if href is not None:
 1542            writer.write_attribute('href', href)
 1543        if obj.index is not None:
 1544            Writer.write_integer(writer, 'index', obj.index)
 1545        if obj.socket is not None:
 1546            Writer.write_integer(writer, 'socket', obj.socket)
 1547        writer.write_end()
 1548
 1549    @staticmethod
 1550    def write_many(objs, writer, singular=None, plural=None):
 1551        if singular is None:
 1552            singular = 'core'
 1553        if plural is None:
 1554            plural = 'cores'
 1555        writer.write_start(plural)
 1556        if type(objs) == List:
 1557            href = objs.href
 1558            if href is not None:
 1559                writer.write_attribute('href', href)
 1560        for obj in objs:
 1561            CoreWriter.write_one(obj, writer, singular)
 1562        writer.write_end()
 1563
 1564
 1565class CpuWriter(Writer):
 1566
 1567    def __init__(self):
 1568        super(CpuWriter, self).__init__()
 1569
 1570    @staticmethod
 1571    def write_one(obj, writer, singular=None):
 1572        if singular is None:
 1573            singular = 'cpu'
 1574        writer.write_start(singular)
 1575        href = obj.href
 1576        if href is not None:
 1577            writer.write_attribute('href', href)
 1578        if obj.architecture is not None:
 1579            Writer.write_string(writer, 'architecture', obj.architecture.value)
 1580        if obj.cores is not None:
 1581            CoreWriter.write_many(obj.cores, writer, 'core', 'cores')
 1582        if obj.cpu_tune is not None:
 1583            CpuTuneWriter.write_one(obj.cpu_tune, writer, 'cpu_tune')
 1584        if obj.level is not None:
 1585            Writer.write_integer(writer, 'level', obj.level)
 1586        if obj.mode is not None:
 1587            Writer.write_string(writer, 'mode', obj.mode.value)
 1588        if obj.name is not None:
 1589            Writer.write_string(writer, 'name', obj.name)
 1590        if obj.speed is not None:
 1591            Writer.write_decimal(writer, 'speed', obj.speed)
 1592        if obj.topology is not None:
 1593            CpuTopologyWriter.write_one(obj.topology, writer, 'topology')
 1594        if obj.type is not None:
 1595            Writer.write_string(writer, 'type', obj.type)
 1596        writer.write_end()
 1597
 1598    @staticmethod
 1599    def write_many(objs, writer, singular=None, plural=None):
 1600        if singular is None:
 1601            singular = 'cpu'
 1602        if plural is None:
 1603            plural = 'cpus'
 1604        writer.write_start(plural)
 1605        if type(objs) == List:
 1606            href = objs.href
 1607            if href is not None:
 1608                writer.write_attribute('href', href)
 1609        for obj in objs:
 1610            CpuWriter.write_one(obj, writer, singular)
 1611        writer.write_end()
 1612
 1613
 1614class CpuProfileWriter(Writer):
 1615
 1616    def __init__(self):
 1617        super(CpuProfileWriter, self).__init__()
 1618
 1619    @staticmethod
 1620    def write_one(obj, writer, singular=None):
 1621        if singular is None:
 1622            singular = 'cpu_profile'
 1623        writer.write_start(singular)
 1624        href = obj.href
 1625        if href is not None:
 1626            writer.write_attribute('href', href)
 1627        if obj.id is not None:
 1628            writer.write_attribute('id', obj.id)
 1629        if obj.comment is not None:
 1630            Writer.write_string(writer, 'comment', obj.comment)
 1631        if obj.description is not None:
 1632            Writer.write_string(writer, 'description', obj.description)
 1633        if obj.name is not None:
 1634            Writer.write_string(writer, 'name', obj.name)
 1635        if obj.cluster is not None:
 1636            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
 1637        if obj.permissions is not None:
 1638            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 1639        if obj.qos is not None:
 1640            QosWriter.write_one(obj.qos, writer, 'qos')
 1641        writer.write_end()
 1642
 1643    @staticmethod
 1644    def write_many(objs, writer, singular=None, plural=None):
 1645        if singular is None:
 1646            singular = 'cpu_profile'
 1647        if plural is None:
 1648            plural = 'cpu_profiles'
 1649        writer.write_start(plural)
 1650        if type(objs) == List:
 1651            href = objs.href
 1652            if href is not None:
 1653                writer.write_attribute('href', href)
 1654        for obj in objs:
 1655            CpuProfileWriter.write_one(obj, writer, singular)
 1656        writer.write_end()
 1657
 1658
 1659class CpuTopologyWriter(Writer):
 1660
 1661    def __init__(self):
 1662        super(CpuTopologyWriter, self).__init__()
 1663
 1664    @staticmethod
 1665    def write_one(obj, writer, singular=None):
 1666        if singular is None:
 1667            singular = 'cpu_topology'
 1668        writer.write_start(singular)
 1669        href = obj.href
 1670        if href is not None:
 1671            writer.write_attribute('href', href)
 1672        if obj.cores is not None:
 1673            Writer.write_integer(writer, 'cores', obj.cores)
 1674        if obj.sockets is not None:
 1675            Writer.write_integer(writer, 'sockets', obj.sockets)
 1676        if obj.threads is not None:
 1677            Writer.write_integer(writer, 'threads', obj.threads)
 1678        writer.write_end()
 1679
 1680    @staticmethod
 1681    def write_many(objs, writer, singular=None, plural=None):
 1682        if singular is None:
 1683            singular = 'cpu_topology'
 1684        if plural is None:
 1685            plural = 'cpu_topologies'
 1686        writer.write_start(plural)
 1687        if type(objs) == List:
 1688            href = objs.href
 1689            if href is not None:
 1690                writer.write_attribute('href', href)
 1691        for obj in objs:
 1692            CpuTopologyWriter.write_one(obj, writer, singular)
 1693        writer.write_end()
 1694
 1695
 1696class CpuTuneWriter(Writer):
 1697
 1698    def __init__(self):
 1699        super(CpuTuneWriter, self).__init__()
 1700
 1701    @staticmethod
 1702    def write_one(obj, writer, singular=None):
 1703        if singular is None:
 1704            singular = 'cpu_tune'
 1705        writer.write_start(singular)
 1706        href = obj.href
 1707        if href is not None:
 1708            writer.write_attribute('href', href)
 1709        if obj.vcpu_pins is not None:
 1710            VcpuPinWriter.write_many(obj.vcpu_pins, writer, 'vcpu_pin', 'vcpu_pins')
 1711        writer.write_end()
 1712
 1713    @staticmethod
 1714    def write_many(objs, writer, singular=None, plural=None):
 1715        if singular is None:
 1716            singular = 'cpu_tune'
 1717        if plural is None:
 1718            plural = 'cpu_tunes'
 1719        writer.write_start(plural)
 1720        if type(objs) == List:
 1721            href = objs.href
 1722            if href is not None:
 1723                writer.write_attribute('href', href)
 1724        for obj in objs:
 1725            CpuTuneWriter.write_one(obj, writer, singular)
 1726        writer.write_end()
 1727
 1728
 1729class CpuTypeWriter(Writer):
 1730
 1731    def __init__(self):
 1732        super(CpuTypeWriter, self).__init__()
 1733
 1734    @staticmethod
 1735    def write_one(obj, writer, singular=None):
 1736        if singular is None:
 1737            singular = 'cpu_type'
 1738        writer.write_start(singular)
 1739        href = obj.href
 1740        if href is not None:
 1741            writer.write_attribute('href', href)
 1742        if obj.architecture is not None:
 1743            Writer.write_string(writer, 'architecture', obj.architecture.value)
 1744        if obj.level is not None:
 1745            Writer.write_integer(writer, 'level', obj.level)
 1746        if obj.name is not None:
 1747            Writer.write_string(writer, 'name', obj.name)
 1748        writer.write_end()
 1749
 1750    @staticmethod
 1751    def write_many(objs, writer, singular=None, plural=None):
 1752        if singular is None:
 1753            singular = 'cpu_type'
 1754        if plural is None:
 1755            plural = 'cpu_types'
 1756        writer.write_start(plural)
 1757        if type(objs) == List:
 1758            href = objs.href
 1759            if href is not None:
 1760                writer.write_attribute('href', href)
 1761        for obj in objs:
 1762            CpuTypeWriter.write_one(obj, writer, singular)
 1763        writer.write_end()
 1764
 1765
 1766class CustomPropertyWriter(Writer):
 1767
 1768    def __init__(self):
 1769        super(CustomPropertyWriter, self).__init__()
 1770
 1771    @staticmethod
 1772    def write_one(obj, writer, singular=None):
 1773        if singular is None:
 1774            singular = 'custom_property'
 1775        writer.write_start(singular)
 1776        href = obj.href
 1777        if href is not None:
 1778            writer.write_attribute('href', href)
 1779        if obj.name is not None:
 1780            Writer.write_string(writer, 'name', obj.name)
 1781        if obj.regexp is not None:
 1782            Writer.write_string(writer, 'regexp', obj.regexp)
 1783        if obj.value is not None:
 1784            Writer.write_string(writer, 'value', obj.value)
 1785        writer.write_end()
 1786
 1787    @staticmethod
 1788    def write_many(objs, writer, singular=None, plural=None):
 1789        if singular is None:
 1790            singular = 'custom_property'
 1791        if plural is None:
 1792            plural = 'custom_properties'
 1793        writer.write_start(plural)
 1794        if type(objs) == List:
 1795            href = objs.href
 1796            if href is not None:
 1797                writer.write_attribute('href', href)
 1798        for obj in objs:
 1799            CustomPropertyWriter.write_one(obj, writer, singular)
 1800        writer.write_end()
 1801
 1802
 1803class DataCenterWriter(Writer):
 1804
 1805    def __init__(self):
 1806        super(DataCenterWriter, self).__init__()
 1807
 1808    @staticmethod
 1809    def write_one(obj, writer, singular=None):
 1810        if singular is None:
 1811            singular = 'data_center'
 1812        writer.write_start(singular)
 1813        href = obj.href
 1814        if href is not None:
 1815            writer.write_attribute('href', href)
 1816        if obj.id is not None:
 1817            writer.write_attribute('id', obj.id)
 1818        if obj.comment is not None:
 1819            Writer.write_string(writer, 'comment', obj.comment)
 1820        if obj.description is not None:
 1821            Writer.write_string(writer, 'description', obj.description)
 1822        if obj.local is not None:
 1823            Writer.write_boolean(writer, 'local', obj.local)
 1824        if obj.name is not None:
 1825            Writer.write_string(writer, 'name', obj.name)
 1826        if obj.quota_mode is not None:
 1827            Writer.write_string(writer, 'quota_mode', obj.quota_mode.value)
 1828        if obj.status is not None:
 1829            Writer.write_string(writer, 'status', obj.status.value)
 1830        if obj.storage_format is not None:
 1831            Writer.write_string(writer, 'storage_format', obj.storage_format.value)
 1832        if obj.supported_versions is not None:
 1833            VersionWriter.write_many(obj.supported_versions, writer, 'version', 'supported_versions')
 1834        if obj.version is not None:
 1835            VersionWriter.write_one(obj.version, writer, 'version')
 1836        if obj.clusters is not None:
 1837            ClusterWriter.write_many(obj.clusters, writer, 'cluster', 'clusters')
 1838        if obj.iscsi_bonds is not None:
 1839            IscsiBondWriter.write_many(obj.iscsi_bonds, writer, 'iscsi_bond', 'iscsi_bonds')
 1840        if obj.mac_pool is not None:
 1841            MacPoolWriter.write_one(obj.mac_pool, writer, 'mac_pool')
 1842        if obj.networks is not None:
 1843            NetworkWriter.write_many(obj.networks, writer, 'network', 'networks')
 1844        if obj.permissions is not None:
 1845            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 1846        if obj.qoss is not None:
 1847            QosWriter.write_many(obj.qoss, writer, 'qos', 'qoss')
 1848        if obj.quotas is not None:
 1849            QuotaWriter.write_many(obj.quotas, writer, 'quota', 'quotas')
 1850        if obj.storage_domains is not None:
 1851            StorageDomainWriter.write_many(obj.storage_domains, writer, 'storage_domain', 'storage_domains')
 1852        writer.write_end()
 1853
 1854    @staticmethod
 1855    def write_many(objs, writer, singular=None, plural=None):
 1856        if singular is None:
 1857            singular = 'data_center'
 1858        if plural is None:
 1859            plural = 'data_centers'
 1860        writer.write_start(plural)
 1861        if type(objs) == List:
 1862            href = objs.href
 1863            if href is not None:
 1864                writer.write_attribute('href', href)
 1865        for obj in objs:
 1866            DataCenterWriter.write_one(obj, writer, singular)
 1867        writer.write_end()
 1868
 1869
 1870class DeviceWriter(Writer):
 1871
 1872    def __init__(self):
 1873        super(DeviceWriter, self).__init__()
 1874
 1875    @staticmethod
 1876    def write_one(obj, writer, singular=None):
 1877        if singular is None:
 1878            singular = 'device'
 1879        writer.write_start(singular)
 1880        href = obj.href
 1881        if href is not None:
 1882            writer.write_attribute('href', href)
 1883        if obj.id is not None:
 1884            writer.write_attribute('id', obj.id)
 1885        if obj.comment is not None:
 1886            Writer.write_string(writer, 'comment', obj.comment)
 1887        if obj.description is not None:
 1888            Writer.write_string(writer, 'description', obj.description)
 1889        if obj.name is not None:
 1890            Writer.write_string(writer, 'name', obj.name)
 1891        if obj.instance_type is not None:
 1892            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
 1893        if obj.template is not None:
 1894            TemplateWriter.write_one(obj.template, writer, 'template')
 1895        if obj.vm is not None:
 1896            VmWriter.write_one(obj.vm, writer, 'vm')
 1897        if obj.vms is not None:
 1898            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
 1899        writer.write_end()
 1900
 1901    @staticmethod
 1902    def write_many(objs, writer, singular=None, plural=None):
 1903        if singular is None:
 1904            singular = 'device'
 1905        if plural is None:
 1906            plural = 'devices'
 1907        writer.write_start(plural)
 1908        if type(objs) == List:
 1909            href = objs.href
 1910            if href is not None:
 1911                writer.write_attribute('href', href)
 1912        for obj in objs:
 1913            DeviceWriter.write_one(obj, writer, singular)
 1914        writer.write_end()
 1915
 1916
 1917class DiskWriter(Writer):
 1918
 1919    def __init__(self):
 1920        super(DiskWriter, self).__init__()
 1921
 1922    @staticmethod
 1923    def write_one(obj, writer, singular=None):
 1924        if singular is None:
 1925            singular = 'disk'
 1926        writer.write_start(singular)
 1927        href = obj.href
 1928        if href is not None:
 1929            writer.write_attribute('href', href)
 1930        if obj.id is not None:
 1931            writer.write_attribute('id', obj.id)
 1932        if obj.active is not None:
 1933            Writer.write_boolean(writer, 'active', obj.active)
 1934        if obj.actual_size is not None:
 1935            Writer.write_integer(writer, 'actual_size', obj.actual_size)
 1936        if obj.alias is not None:
 1937            Writer.write_string(writer, 'alias', obj.alias)
 1938        if obj.backup is not None:
 1939            Writer.write_string(writer, 'backup', obj.backup.value)
 1940        if obj.backup_mode is not None:
 1941            Writer.write_string(writer, 'backup_mode', obj.backup_mode.value)
 1942        if obj.bootable is not None:
 1943            Writer.write_boolean(writer, 'bootable', obj.bootable)
 1944        if obj.comment is not None:
 1945            Writer.write_string(writer, 'comment', obj.comment)
 1946        if obj.content_type is not None:
 1947            Writer.write_string(writer, 'content_type', obj.content_type.value)
 1948        if obj.description is not None:
 1949            Writer.write_string(writer, 'description', obj.description)
 1950        if obj.external_disk is not None:
 1951            Writer.write_string(writer, 'external_disk', obj.external_disk)
 1952        if obj.format is not None:
 1953            Writer.write_string(writer, 'format', obj.format.value)
 1954        if obj.image_id is not None:
 1955            Writer.write_string(writer, 'image_id', obj.image_id)
 1956        if obj.initial_size is not None:
 1957            Writer.write_integer(writer, 'initial_size', obj.initial_size)
 1958        if obj.interface is not None:
 1959            Writer.write_string(writer, 'interface', obj.interface.value)
 1960        if obj.logical_name is not None:
 1961            Writer.write_string(writer, 'logical_name', obj.logical_name)
 1962        if obj.lun_storage is not None:
 1963            HostStorageWriter.write_one(obj.lun_storage, writer, 'lun_storage')
 1964        if obj.name is not None:
 1965            Writer.write_string(writer, 'name', obj.name)
 1966        if obj.propagate_errors is not None:
 1967            Writer.write_boolean(writer, 'propagate_errors', obj.propagate_errors)
 1968        if obj.provisioned_size is not None:
 1969            Writer.write_integer(writer, 'provisioned_size', obj.provisioned_size)
 1970        if obj.qcow_version is not None:
 1971            Writer.write_string(writer, 'qcow_version', obj.qcow_version.value)
 1972        if obj.read_only is not None:
 1973            Writer.write_boolean(writer, 'read_only', obj.read_only)
 1974        if obj.sgio is not None:
 1975            Writer.write_string(writer, 'sgio', obj.sgio.value)
 1976        if obj.shareable is not None:
 1977            Writer.write_boolean(writer, 'shareable', obj.shareable)
 1978        if obj.sparse is not None:
 1979            Writer.write_boolean(writer, 'sparse', obj.sparse)
 1980        if obj.status is not None:
 1981            Writer.write_string(writer, 'status', obj.status.value)
 1982        if obj.storage_type is not None:
 1983            Writer.write_string(writer, 'storage_type', obj.storage_type.value)
 1984        if obj.total_size is not None:
 1985            Writer.write_integer(writer, 'total_size', obj.total_size)
 1986        if obj.uses_scsi_reservation is not None:
 1987            Writer.write_boolean(writer, 'uses_scsi_reservation', obj.uses_scsi_reservation)
 1988        if obj.wipe_after_delete is not None:
 1989            Writer.write_boolean(writer, 'wipe_after_delete', obj.wipe_after_delete)
 1990        if obj.disk_profile is not None:
 1991            DiskProfileWriter.write_one(obj.disk_profile, writer, 'disk_profile')
 1992        if obj.disk_snapshots is not None:
 1993            DiskSnapshotWriter.write_many(obj.disk_snapshots, writer, 'disk_snapshot', 'disk_snapshots')
 1994        if obj.instance_type is not None:
 1995            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
 1996        if obj.openstack_volume_type is not None:
 1997            OpenStackVolumeTypeWriter.write_one(obj.openstack_volume_type, writer, 'openstack_volume_type')
 1998        if obj.permissions is not None:
 1999            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 2000        if obj.quota is not None:
 2001            QuotaWriter.write_one(obj.quota, writer, 'quota')
 2002        if obj.snapshot is not None:
 2003            SnapshotWriter.write_one(obj.snapshot, writer, 'snapshot')
 2004        if obj.statistics is not None:
 2005            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
 2006        if obj.storage_domain is not None:
 2007            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
 2008        if obj.storage_domains is not None:
 2009            StorageDomainWriter.write_many(obj.storage_domains, writer, 'storage_domain', 'storage_domains')
 2010        if obj.template is not None:
 2011            TemplateWriter.write_one(obj.template, writer, 'template')
 2012        if obj.vm is not None:
 2013            VmWriter.write_one(obj.vm, writer, 'vm')
 2014        if obj.vms is not None:
 2015            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
 2016        writer.write_end()
 2017
 2018    @staticmethod
 2019    def write_many(objs, writer, singular=None, plural=None):
 2020        if singular is None:
 2021            singular = 'disk'
 2022        if plural is None:
 2023            plural = 'disks'
 2024        writer.write_start(plural)
 2025        if type(objs) == List:
 2026            href = objs.href
 2027            if href is not None:
 2028                writer.write_attribute('href', href)
 2029        for obj in objs:
 2030            DiskWriter.write_one(obj, writer, singular)
 2031        writer.write_end()
 2032
 2033
 2034class DiskAttachmentWriter(Writer):
 2035
 2036    def __init__(self):
 2037        super(DiskAttachmentWriter, self).__init__()
 2038
 2039    @staticmethod
 2040    def write_one(obj, writer, singular=None):
 2041        if singular is None:
 2042            singular = 'disk_attachment'
 2043        writer.write_start(singular)
 2044        href = obj.href
 2045        if href is not None:
 2046            writer.write_attribute('href', href)
 2047        if obj.id is not None:
 2048            writer.write_attribute('id', obj.id)
 2049        if obj.active is not None:
 2050            Writer.write_boolean(writer, 'active', obj.active)
 2051        if obj.bootable is not None:
 2052            Writer.write_boolean(writer, 'bootable', obj.bootable)
 2053        if obj.comment is not None:
 2054            Writer.write_string(writer, 'comment', obj.comment)
 2055        if obj.description is not None:
 2056            Writer.write_string(writer, 'description', obj.description)
 2057        if obj.interface is not None:
 2058            Writer.write_string(writer, 'interface', obj.interface.value)
 2059        if obj.logical_name is not None:
 2060            Writer.write_string(writer, 'logical_name', obj.logical_name)
 2061        if obj.name is not None:
 2062            Writer.write_string(writer, 'name', obj.name)
 2063        if obj.pass_discard is not None:
 2064            Writer.write_boolean(writer, 'pass_discard', obj.pass_discard)
 2065        if obj.read_only is not None:
 2066            Writer.write_boolean(writer, 'read_only', obj.read_only)
 2067        if obj.uses_scsi_reservation is not None:
 2068            Writer.write_boolean(writer, 'uses_scsi_reservation', obj.uses_scsi_reservation)
 2069        if obj.disk is not None:
 2070            DiskWriter.write_one(obj.disk, writer, 'disk')
 2071        if obj.template is not None:
 2072            TemplateWriter.write_one(obj.template, writer, 'template')
 2073        if obj.vm is not None:
 2074            VmWriter.write_one(obj.vm, writer, 'vm')
 2075        writer.write_end()
 2076
 2077    @staticmethod
 2078    def write_many(objs, writer, singular=None, plural=None):
 2079        if singular is None:
 2080            singular = 'disk_attachment'
 2081        if plural is None:
 2082            plural = 'disk_attachments'
 2083        writer.write_start(plural)
 2084        if type(objs) == List:
 2085            href = objs.href
 2086            if href is not None:
 2087                writer.write_attribute('href', href)
 2088        for obj in objs:
 2089            DiskAttachmentWriter.write_one(obj, writer, singular)
 2090        writer.write_end()
 2091
 2092
 2093class DiskProfileWriter(Writer):
 2094
 2095    def __init__(self):
 2096        super(DiskProfileWriter, self).__init__()
 2097
 2098    @staticmethod
 2099    def write_one(obj, writer, singular=None):
 2100        if singular is None:
 2101            singular = 'disk_profile'
 2102        writer.write_start(singular)
 2103        href = obj.href
 2104        if href is not None:
 2105            writer.write_attribute('href', href)
 2106        if obj.id is not None:
 2107            writer.write_attribute('id', obj.id)
 2108        if obj.comment is not None:
 2109            Writer.write_string(writer, 'comment', obj.comment)
 2110        if obj.description is not None:
 2111            Writer.write_string(writer, 'description', obj.description)
 2112        if obj.name is not None:
 2113            Writer.write_string(writer, 'name', obj.name)
 2114        if obj.permissions is not None:
 2115            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 2116        if obj.qos is not None:
 2117            QosWriter.write_one(obj.qos, writer, 'qos')
 2118        if obj.storage_domain is not None:
 2119            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
 2120        writer.write_end()
 2121
 2122    @staticmethod
 2123    def write_many(objs, writer, singular=None, plural=None):
 2124        if singular is None:
 2125            singular = 'disk_profile'
 2126        if plural is None:
 2127            plural = 'disk_profiles'
 2128        writer.write_start(plural)
 2129        if type(objs) == List:
 2130            href = objs.href
 2131            if href is not None:
 2132                writer.write_attribute('href', href)
 2133        for obj in objs:
 2134            DiskProfileWriter.write_one(obj, writer, singular)
 2135        writer.write_end()
 2136
 2137
 2138class DiskSnapshotWriter(Writer):
 2139
 2140    def __init__(self):
 2141        super(DiskSnapshotWriter, self).__init__()
 2142
 2143    @staticmethod
 2144    def write_one(obj, writer, singular=None):
 2145        if singular is None:
 2146            singular = 'disk_snapshot'
 2147        writer.write_start(singular)
 2148        href = obj.href
 2149        if href is not None:
 2150            writer.write_attribute('href', href)
 2151        if obj.id is not None:
 2152            writer.write_attribute('id', obj.id)
 2153        if obj.active is not None:
 2154            Writer.write_boolean(writer, 'active', obj.active)
 2155        if obj.actual_size is not None:
 2156            Writer.write_integer(writer, 'actual_size', obj.actual_size)
 2157        if obj.alias is not None:
 2158            Writer.write_string(writer, 'alias', obj.alias)
 2159        if obj.backup is not None:
 2160            Writer.write_string(writer, 'backup', obj.backup.value)
 2161        if obj.backup_mode is not None:
 2162            Writer.write_string(writer, 'backup_mode', obj.backup_mode.value)
 2163        if obj.bootable is not None:
 2164            Writer.write_boolean(writer, 'bootable', obj.bootable)
 2165        if obj.comment is not None:
 2166            Writer.write_string(writer, 'comment', obj.comment)
 2167        if obj.content_type is not None:
 2168            Writer.write_string(writer, 'content_type', obj.content_type.value)
 2169        if obj.description is not None:
 2170            Writer.write_string(writer, 'description', obj.description)
 2171        if obj.external_disk is not None:
 2172            Writer.write_string(writer, 'external_disk', obj.external_disk)
 2173        if obj.format is not None:
 2174            Writer.write_string(writer, 'format', obj.format.value)
 2175        if obj.image_id is not None:
 2176            Writer.write_string(writer, 'image_id', obj.image_id)
 2177        if obj.initial_size is not None:
 2178            Writer.write_integer(writer, 'initial_size', obj.initial_size)
 2179        if obj.interface is not None:
 2180            Writer.write_string(writer, 'interface', obj.interface.value)
 2181        if obj.logical_name is not None:
 2182            Writer.write_string(writer, 'logical_name', obj.logical_name)
 2183        if obj.lun_storage is not None:
 2184            HostStorageWriter.write_one(obj.lun_storage, writer, 'lun_storage')
 2185        if obj.name is not None:
 2186            Writer.write_string(writer, 'name', obj.name)
 2187        if obj.propagate_errors is not None:
 2188            Writer.write_boolean(writer, 'propagate_errors', obj.propagate_errors)
 2189        if obj.provisioned_size is not None:
 2190            Writer.write_integer(writer, 'provisioned_size', obj.provisioned_size)
 2191        if obj.qcow_version is not None:
 2192            Writer.write_string(writer, 'qcow_version', obj.qcow_version.value)
 2193        if obj.read_only is not None:
 2194            Writer.write_boolean(writer, 'read_only', obj.read_only)
 2195        if obj.sgio is not None:
 2196            Writer.write_string(writer, 'sgio', obj.sgio.value)
 2197        if obj.shareable is not None:
 2198            Writer.write_boolean(writer, 'shareable', obj.shareable)
 2199        if obj.sparse is not None:
 2200            Writer.write_boolean(writer, 'sparse', obj.sparse)
 2201        if obj.status is not None:
 2202            Writer.write_string(writer, 'status', obj.status.value)
 2203        if obj.storage_type is not None:
 2204            Writer.write_string(writer, 'storage_type', obj.storage_type.value)
 2205        if obj.total_size is not None:
 2206            Writer.write_integer(writer, 'total_size', obj.total_size)
 2207        if obj.uses_scsi_reservation is not None:
 2208            Writer.write_boolean(writer, 'uses_scsi_reservation', obj.uses_scsi_reservation)
 2209        if obj.wipe_after_delete is not None:
 2210            Writer.write_boolean(writer, 'wipe_after_delete', obj.wipe_after_delete)
 2211        if obj.disk is not None:
 2212            DiskWriter.write_one(obj.disk, writer, 'disk')
 2213        if obj.disk_profile is not None:
 2214            DiskProfileWriter.write_one(obj.disk_profile, writer, 'disk_profile')
 2215        if obj.disk_snapshots is not None:
 2216            DiskSnapshotWriter.write_many(obj.disk_snapshots, writer, 'disk_snapshot', 'disk_snapshots')
 2217        if obj.instance_type is not None:
 2218            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
 2219        if obj.openstack_volume_type is not None:
 2220            OpenStackVolumeTypeWriter.write_one(obj.openstack_volume_type, writer, 'openstack_volume_type')
 2221        if obj.parent is not None:
 2222            DiskSnapshotWriter.write_one(obj.parent, writer, 'parent')
 2223        if obj.permissions is not None:
 2224            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 2225        if obj.quota is not None:
 2226            QuotaWriter.write_one(obj.quota, writer, 'quota')
 2227        if obj.snapshot is not None:
 2228            SnapshotWriter.write_one(obj.snapshot, writer, 'snapshot')
 2229        if obj.statistics is not None:
 2230            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
 2231        if obj.storage_domain is not None:
 2232            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
 2233        if obj.storage_domains is not None:
 2234            StorageDomainWriter.write_many(obj.storage_domains, writer, 'storage_domain', 'storage_domains')
 2235        if obj.template is not None:
 2236            TemplateWriter.write_one(obj.template, writer, 'template')
 2237        if obj.vm is not None:
 2238            VmWriter.write_one(obj.vm, writer, 'vm')
 2239        if obj.vms is not None:
 2240            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
 2241        writer.write_end()
 2242
 2243    @staticmethod
 2244    def write_many(objs, writer, singular=None, plural=None):
 2245        if singular is None:
 2246            singular = 'disk_snapshot'
 2247        if plural is None:
 2248            plural = 'disk_snapshots'
 2249        writer.write_start(plural)
 2250        if type(objs) == List:
 2251            href = objs.href
 2252            if href is not None:
 2253                writer.write_attribute('href', href)
 2254        for obj in objs:
 2255            DiskSnapshotWriter.write_one(obj, writer, singular)
 2256        writer.write_end()
 2257
 2258
 2259class DisplayWriter(Writer):
 2260
 2261    def __init__(self):
 2262        super(DisplayWriter, self).__init__()
 2263
 2264    @staticmethod
 2265    def write_one(obj, writer, singular=None):
 2266        if singular is None:
 2267            singular = 'display'
 2268        writer.write_start(singular)
 2269        href = obj.href
 2270        if href is not None:
 2271            writer.write_attribute('href', href)
 2272        if obj.address is not None:
 2273            Writer.write_string(writer, 'address', obj.address)
 2274        if obj.allow_override is not None:
 2275            Writer.write_boolean(writer, 'allow_override', obj.allow_override)
 2276        if obj.certificate is not None:
 2277            CertificateWriter.write_one(obj.certificate, writer, 'certificate')
 2278        if obj.copy_paste_enabled is not None:
 2279            Writer.write_boolean(writer, 'copy_paste_enabled', obj.copy_paste_enabled)
 2280        if obj.disconnect_action is not None:
 2281            Writer.write_string(writer, 'disconnect_action', obj.disconnect_action)
 2282        if obj.disconnect_action_delay is not None:
 2283            Writer.write_integer(writer, 'disconnect_action_delay', obj.disconnect_action_delay)
 2284        if obj.file_transfer_enabled is not None:
 2285            Writer.write_boolean(writer, 'file_transfer_enabled', obj.file_transfer_enabled)
 2286        if obj.keyboard_layout is not None:
 2287            Writer.write_string(writer, 'keyboard_layout', obj.keyboard_layout)
 2288        if obj.monitors is not None:
 2289            Writer.write_integer(writer, 'monitors', obj.monitors)
 2290        if obj.port is not None:
 2291            Writer.write_integer(writer, 'port', obj.port)
 2292        if obj.proxy is not None:
 2293            Writer.write_string(writer, 'proxy', obj.proxy)
 2294        if obj.secure_port is not None:
 2295            Writer.write_integer(writer, 'secure_port', obj.secure_port)
 2296        if obj.single_qxl_pci is not None:
 2297            Writer.write_boolean(writer, 'single_qxl_pci', obj.single_qxl_pci)
 2298        if obj.smartcard_enabled is not None:
 2299            Writer.write_boolean(writer, 'smartcard_enabled', obj.smartcard_enabled)
 2300        if obj.type is not None:
 2301            Writer.write_string(writer, 'type', obj.type.value)
 2302        writer.write_end()
 2303
 2304    @staticmethod
 2305    def write_many(objs, writer, singular=None, plural=None):
 2306        if singular is None:
 2307            singular = 'display'
 2308        if plural is None:
 2309            plural = 'displays'
 2310        writer.write_start(plural)
 2311        if type(objs) == List:
 2312            href = objs.href
 2313            if href is not None:
 2314                writer.write_attribute('href', href)
 2315        for obj in objs:
 2316            DisplayWriter.write_one(obj, writer, singular)
 2317        writer.write_end()
 2318
 2319
 2320class DnsWriter(Writer):
 2321
 2322    def __init__(self):
 2323        super(DnsWriter, self).__init__()
 2324
 2325    @staticmethod
 2326    def write_one(obj, writer, singular=None):
 2327        if singular is None:
 2328            singular = 'dns'
 2329        writer.write_start(singular)
 2330        href = obj.href
 2331        if href is not None:
 2332            writer.write_attribute('href', href)
 2333        if obj.search_domains is not None:
 2334            HostWriter.write_many(obj.search_domains, writer, 'host', 'search_domains')
 2335        if obj.servers is not None:
 2336            HostWriter.write_many(obj.servers, writer, 'host', 'servers')
 2337        writer.write_end()
 2338
 2339    @staticmethod
 2340    def write_many(objs, writer, singular=None, plural=None):
 2341        if singular is None:
 2342            singular = 'dns'
 2343        if plural is None:
 2344            plural = 'dnss'
 2345        writer.write_start(plural)
 2346        if type(objs) == List:
 2347            href = objs.href
 2348            if href is not None:
 2349                writer.write_attribute('href', href)
 2350        for obj in objs:
 2351            DnsWriter.write_one(obj, writer, singular)
 2352        writer.write_end()
 2353
 2354
 2355class DnsResolverConfigurationWriter(Writer):
 2356
 2357    def __init__(self):
 2358        super(DnsResolverConfigurationWriter, self).__init__()
 2359
 2360    @staticmethod
 2361    def write_one(obj, writer, singular=None):
 2362        if singular is None:
 2363            singular = 'dns_resolver_configuration'
 2364        writer.write_start(singular)
 2365        href = obj.href
 2366        if href is not None:
 2367            writer.write_attribute('href', href)
 2368        if obj.name_servers is not None:
 2369            writer.write_start('name_servers')
 2370            for item in obj.name_servers:
 2371                if item is not None:
 2372                    Writer.write_string(writer, 'name_server', item)
 2373            writer.write_end()
 2374        writer.write_end()
 2375
 2376    @staticmethod
 2377    def write_many(objs, writer, singular=None, plural=None):
 2378        if singular is None:
 2379            singular = 'dns_resolver_configuration'
 2380        if plural is None:
 2381            plural = 'dns_resolver_configurations'
 2382        writer.write_start(plural)
 2383        if type(objs) == List:
 2384            href = objs.href
 2385            if href is not None:
 2386                writer.write_attribute('href', href)
 2387        for obj in objs:
 2388            DnsResolverConfigurationWriter.write_one(obj, writer, singular)
 2389        writer.write_end()
 2390
 2391
 2392class DomainWriter(Writer):
 2393
 2394    def __init__(self):
 2395        super(DomainWriter, self).__init__()
 2396
 2397    @staticmethod
 2398    def write_one(obj, writer, singular=None):
 2399        if singular is None:
 2400            singular = 'domain'
 2401        writer.write_start(singular)
 2402        href = obj.href
 2403        if href is not None:
 2404            writer.write_attribute('href', href)
 2405        if obj.id is not None:
 2406            writer.write_attribute('id', obj.id)
 2407        if obj.comment is not None:
 2408            Writer.write_string(writer, 'comment', obj.comment)
 2409        if obj.description is not None:
 2410            Writer.write_string(writer, 'description', obj.description)
 2411        if obj.name is not None:
 2412            Writer.write_string(writer, 'name', obj.name)
 2413        if obj.user is not None:
 2414            UserWriter.write_one(obj.user, writer, 'user')
 2415        if obj.groups is not None:
 2416            GroupWriter.write_many(obj.groups, writer, 'group', 'groups')
 2417        if obj.users is not None:
 2418            UserWriter.write_many(obj.users, writer, 'user', 'users')
 2419        writer.write_end()
 2420
 2421    @staticmethod
 2422    def write_many(objs, writer, singular=None, plural=None):
 2423        if singular is None:
 2424            singular = 'domain'
 2425        if plural is None:
 2426            plural = 'domains'
 2427        writer.write_start(plural)
 2428        if type(objs) == List:
 2429            href = objs.href
 2430            if href is not None:
 2431                writer.write_attribute('href', href)
 2432        for obj in objs:
 2433            DomainWriter.write_one(obj, writer, singular)
 2434        writer.write_end()
 2435
 2436
 2437class DynamicCpuWriter(Writer):
 2438
 2439    def __init__(self):
 2440        super(DynamicCpuWriter, self).__init__()
 2441
 2442    @staticmethod
 2443    def write_one(obj, writer, singular=None):
 2444        if singular is None:
 2445            singular = 'dynamic_cpu'
 2446        writer.write_start(singular)
 2447        href = obj.href
 2448        if href is not None:
 2449            writer.write_attribute('href', href)
 2450        if obj.cpu_tune is not None:
 2451            CpuTuneWriter.write_one(obj.cpu_tune, writer, 'cpu_tune')
 2452        if obj.topology is not None:
 2453            CpuTopologyWriter.write_one(obj.topology, writer, 'topology')
 2454        writer.write_end()
 2455
 2456    @staticmethod
 2457    def write_many(objs, writer, singular=None, plural=None):
 2458        if singular is None:
 2459            singular = 'dynamic_cpu'
 2460        if plural is None:
 2461            plural = 'dynamic_cpus'
 2462        writer.write_start(plural)
 2463        if type(objs) == List:
 2464            href = objs.href
 2465            if href is not None:
 2466                writer.write_attribute('href', href)
 2467        for obj in objs:
 2468            DynamicCpuWriter.write_one(obj, writer, singular)
 2469        writer.write_end()
 2470
 2471
 2472class EntityProfileDetailWriter(Writer):
 2473
 2474    def __init__(self):
 2475        super(EntityProfileDetailWriter, self).__init__()
 2476
 2477    @staticmethod
 2478    def write_one(obj, writer, singular=None):
 2479        if singular is None:
 2480            singular = 'entity_profile_detail'
 2481        writer.write_start(singular)
 2482        href = obj.href
 2483        if href is not None:
 2484            writer.write_attribute('href', href)
 2485        if obj.profile_details is not None:
 2486            ProfileDetailWriter.write_many(obj.profile_details, writer, 'profile_detail', 'profile_details')
 2487        writer.write_end()
 2488
 2489    @staticmethod
 2490    def write_many(objs, writer, singular=None, plural=None):
 2491        if singular is None:
 2492            singular = 'entity_profile_detail'
 2493        if plural is None:
 2494            plural = 'entity_profile_details'
 2495        writer.write_start(plural)
 2496        if type(objs) == List:
 2497            href = objs.href
 2498            if href is not None:
 2499                writer.write_attribute('href', href)
 2500        for obj in objs:
 2501            EntityProfileDetailWriter.write_one(obj, writer, singular)
 2502        writer.write_end()
 2503
 2504
 2505class ErrorHandlingWriter(Writer):
 2506
 2507    def __init__(self):
 2508        super(ErrorHandlingWriter, self).__init__()
 2509
 2510    @staticmethod
 2511    def write_one(obj, writer, singular=None):
 2512        if singular is None:
 2513            singular = 'error_handling'
 2514        writer.write_start(singular)
 2515        href = obj.href
 2516        if href is not None:
 2517            writer.write_attribute('href', href)
 2518        if obj.on_error is not None:
 2519            Writer.write_string(writer, 'on_error', obj.on_error.value)
 2520        writer.write_end()
 2521
 2522    @staticmethod
 2523    def write_many(objs, writer, singular=None, plural=None):
 2524        if singular is None:
 2525            singular = 'error_handling'
 2526        if plural is None:
 2527            plural = 'error_handlings'
 2528        writer.write_start(plural)
 2529        if type(objs) == List:
 2530            href = objs.href
 2531            if href is not None:
 2532                writer.write_attribute('href', href)
 2533        for obj in objs:
 2534            ErrorHandlingWriter.write_one(obj, writer, singular)
 2535        writer.write_end()
 2536
 2537
 2538class EventWriter(Writer):
 2539
 2540    def __init__(self):
 2541        super(EventWriter, self).__init__()
 2542
 2543    @staticmethod
 2544    def write_one(obj, writer, singular=None):
 2545        if singular is None:
 2546            singular = 'event'
 2547        writer.write_start(singular)
 2548        href = obj.href
 2549        if href is not None:
 2550            writer.write_attribute('href', href)
 2551        if obj.id is not None:
 2552            writer.write_attribute('id', obj.id)
 2553        if obj.code is not None:
 2554            Writer.write_integer(writer, 'code', obj.code)
 2555        if obj.comment is not None:
 2556            Writer.write_string(writer, 'comment', obj.comment)
 2557        if obj.correlation_id is not None:
 2558            Writer.write_string(writer, 'correlation_id', obj.correlation_id)
 2559        if obj.custom_data is not None:
 2560            Writer.write_string(writer, 'custom_data', obj.custom_data)
 2561        if obj.custom_id is not None:
 2562            Writer.write_integer(writer, 'custom_id', obj.custom_id)
 2563        if obj.description is not None:
 2564            Writer.write_string(writer, 'description', obj.description)
 2565        if obj.flood_rate is not None:
 2566            Writer.write_integer(writer, 'flood_rate', obj.flood_rate)
 2567        if obj.index is not None:
 2568            Writer.write_integer(writer, 'index', obj.index)
 2569        if obj.log_on_host is not None:
 2570            Writer.write_boolean(writer, 'log_on_host', obj.log_on_host)
 2571        if obj.name is not None:
 2572            Writer.write_string(writer, 'name', obj.name)
 2573        if obj.origin is not None:
 2574            Writer.write_string(writer, 'origin', obj.origin)
 2575        if obj.severity is not None:
 2576            Writer.write_string(writer, 'severity', obj.severity.value)
 2577        if obj.time is not None:
 2578            Writer.write_date(writer, 'time', obj.time)
 2579        if obj.cluster is not None:
 2580            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
 2581        if obj.data_center is not None:
 2582            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
 2583        if obj.host is not None:
 2584            HostWriter.write_one(obj.host, writer, 'host')
 2585        if obj.storage_domain is not None:
 2586            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
 2587        if obj.template is not None:
 2588            TemplateWriter.write_one(obj.template, writer, 'template')
 2589        if obj.user is not None:
 2590            UserWriter.write_one(obj.user, writer, 'user')
 2591        if obj.vm is not None:
 2592            VmWriter.write_one(obj.vm, writer, 'vm')
 2593        writer.write_end()
 2594
 2595    @staticmethod
 2596    def write_many(objs, writer, singular=None, plural=None):
 2597        if singular is None:
 2598            singular = 'event'
 2599        if plural is None:
 2600            plural = 'events'
 2601        writer.write_start(plural)
 2602        if type(objs) == List:
 2603            href = objs.href
 2604            if href is not None:
 2605                writer.write_attribute('href', href)
 2606        for obj in objs:
 2607            EventWriter.write_one(obj, writer, singular)
 2608        writer.write_end()
 2609
 2610
 2611class EventSubscriptionWriter(Writer):
 2612
 2613    def __init__(self):
 2614        super(EventSubscriptionWriter, self).__init__()
 2615
 2616    @staticmethod
 2617    def write_one(obj, writer, singular=None):
 2618        if singular is None:
 2619            singular = 'event_subscription'
 2620        writer.write_start(singular)
 2621        href = obj.href
 2622        if href is not None:
 2623            writer.write_attribute('href', href)
 2624        if obj.id is not None:
 2625            writer.write_attribute('id', obj.id)
 2626        if obj.address is not None:
 2627            Writer.write_string(writer, 'address', obj.address)
 2628        if obj.comment is not None:
 2629            Writer.write_string(writer, 'comment', obj.comment)
 2630        if obj.description is not None:
 2631            Writer.write_string(writer, 'description', obj.description)
 2632        if obj.event is not None:
 2633            Writer.write_string(writer, 'event', obj.event.value)
 2634        if obj.name is not None:
 2635            Writer.write_string(writer, 'name', obj.name)
 2636        if obj.notification_method is not None:
 2637            Writer.write_string(writer, 'notification_method', obj.notification_method.value)
 2638        if obj.user is not None:
 2639            UserWriter.write_one(obj.user, writer, 'user')
 2640        writer.write_end()
 2641
 2642    @staticmethod
 2643    def write_many(objs, writer, singular=None, plural=None):
 2644        if singular is None:
 2645            singular = 'event_subscription'
 2646        if plural is None:
 2647            plural = 'event_subscriptions'
 2648        writer.write_start(plural)
 2649        if type(objs) == List:
 2650            href = objs.href
 2651            if href is not None:
 2652                writer.write_attribute('href', href)
 2653        for obj in objs:
 2654            EventSubscriptionWriter.write_one(obj, writer, singular)
 2655        writer.write_end()
 2656
 2657
 2658class ExternalComputeResourceWriter(Writer):
 2659
 2660    def __init__(self):
 2661        super(ExternalComputeResourceWriter, self).__init__()
 2662
 2663    @staticmethod
 2664    def write_one(obj, writer, singular=None):
 2665        if singular is None:
 2666            singular = 'external_compute_resource'
 2667        writer.write_start(singular)
 2668        href = obj.href
 2669        if href is not None:
 2670            writer.write_attribute('href', href)
 2671        if obj.id is not None:
 2672            writer.write_attribute('id', obj.id)
 2673        if obj.comment is not None:
 2674            Writer.write_string(writer, 'comment', obj.comment)
 2675        if obj.description is not None:
 2676            Writer.write_string(writer, 'description', obj.description)
 2677        if obj.name is not None:
 2678            Writer.write_string(writer, 'name', obj.name)
 2679        if obj.provider is not None:
 2680            Writer.write_string(writer, 'provider', obj.provider)
 2681        if obj.url is not None:
 2682            Writer.write_string(writer, 'url', obj.url)
 2683        if obj.user is not None:
 2684            Writer.write_string(writer, 'user', obj.user)
 2685        if obj.external_host_provider is not None:
 2686            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
 2687        writer.write_end()
 2688
 2689    @staticmethod
 2690    def write_many(objs, writer, singular=None, plural=None):
 2691        if singular is None:
 2692            singular = 'external_compute_resource'
 2693        if plural is None:
 2694            plural = 'external_compute_resources'
 2695        writer.write_start(plural)
 2696        if type(objs) == List:
 2697            href = objs.href
 2698            if href is not None:
 2699                writer.write_attribute('href', href)
 2700        for obj in objs:
 2701            ExternalComputeResourceWriter.write_one(obj, writer, singular)
 2702        writer.write_end()
 2703
 2704
 2705class ExternalDiscoveredHostWriter(Writer):
 2706
 2707    def __init__(self):
 2708        super(ExternalDiscoveredHostWriter, self).__init__()
 2709
 2710    @staticmethod
 2711    def write_one(obj, writer, singular=None):
 2712        if singular is None:
 2713            singular = 'external_discovered_host'
 2714        writer.write_start(singular)
 2715        href = obj.href
 2716        if href is not None:
 2717            writer.write_attribute('href', href)
 2718        if obj.id is not None:
 2719            writer.write_attribute('id', obj.id)
 2720        if obj.comment is not None:
 2721            Writer.write_string(writer, 'comment', obj.comment)
 2722        if obj.description is not None:
 2723            Writer.write_string(writer, 'description', obj.description)
 2724        if obj.ip is not None:
 2725            Writer.write_string(writer, 'ip', obj.ip)
 2726        if obj.last_report is not None:
 2727            Writer.write_string(writer, 'last_report', obj.last_report)
 2728        if obj.mac is not None:
 2729            Writer.write_string(writer, 'mac', obj.mac)
 2730        if obj.name is not None:
 2731            Writer.write_string(writer, 'name', obj.name)
 2732        if obj.subnet_name is not None:
 2733            Writer.write_string(writer, 'subnet_name', obj.subnet_name)
 2734        if obj.external_host_provider is not None:
 2735            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
 2736        writer.write_end()
 2737
 2738    @staticmethod
 2739    def write_many(objs, writer, singular=None, plural=None):
 2740        if singular is None:
 2741            singular = 'external_discovered_host'
 2742        if plural is None:
 2743            plural = 'external_discovered_hosts'
 2744        writer.write_start(plural)
 2745        if type(objs) == List:
 2746            href = objs.href
 2747            if href is not None:
 2748                writer.write_attribute('href', href)
 2749        for obj in objs:
 2750            ExternalDiscoveredHostWriter.write_one(obj, writer, singular)
 2751        writer.write_end()
 2752
 2753
 2754class ExternalHostWriter(Writer):
 2755
 2756    def __init__(self):
 2757        super(ExternalHostWriter, self).__init__()
 2758
 2759    @staticmethod
 2760    def write_one(obj, writer, singular=None):
 2761        if singular is None:
 2762            singular = 'external_host'
 2763        writer.write_start(singular)
 2764        href = obj.href
 2765        if href is not None:
 2766            writer.write_attribute('href', href)
 2767        if obj.id is not None:
 2768            writer.write_attribute('id', obj.id)
 2769        if obj.address is not None:
 2770            Writer.write_string(writer, 'address', obj.address)
 2771        if obj.comment is not None:
 2772            Writer.write_string(writer, 'comment', obj.comment)
 2773        if obj.description is not None:
 2774            Writer.write_string(writer, 'description', obj.description)
 2775        if obj.name is not None:
 2776            Writer.write_string(writer, 'name', obj.name)
 2777        if obj.external_host_provider is not None:
 2778            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
 2779        writer.write_end()
 2780
 2781    @staticmethod
 2782    def write_many(objs, writer, singular=None, plural=None):
 2783        if singular is None:
 2784            singular = 'external_host'
 2785        if plural is None:
 2786            plural = 'external_hosts'
 2787        writer.write_start(plural)
 2788        if type(objs) == List:
 2789            href = objs.href
 2790            if href is not None:
 2791                writer.write_attribute('href', href)
 2792        for obj in objs:
 2793            ExternalHostWriter.write_one(obj, writer, singular)
 2794        writer.write_end()
 2795
 2796
 2797class ExternalHostGroupWriter(Writer):
 2798
 2799    def __init__(self):
 2800        super(ExternalHostGroupWriter, self).__init__()
 2801
 2802    @staticmethod
 2803    def write_one(obj, writer, singular=None):
 2804        if singular is None:
 2805            singular = 'external_host_group'
 2806        writer.write_start(singular)
 2807        href = obj.href
 2808        if href is not None:
 2809            writer.write_attribute('href', href)
 2810        if obj.id is not None:
 2811            writer.write_attribute('id', obj.id)
 2812        if obj.architecture_name is not None:
 2813            Writer.write_string(writer, 'architecture_name', obj.architecture_name)
 2814        if obj.comment is not None:
 2815            Writer.write_string(writer, 'comment', obj.comment)
 2816        if obj.description is not None:
 2817            Writer.write_string(writer, 'description', obj.description)
 2818        if obj.domain_name is not None:
 2819            Writer.write_string(writer, 'domain_name', obj.domain_name)
 2820        if obj.name is not None:
 2821            Writer.write_string(writer, 'name', obj.name)
 2822        if obj.operating_system_name is not None:
 2823            Writer.write_string(writer, 'operating_system_name', obj.operating_system_name)
 2824        if obj.subnet_name is not None:
 2825            Writer.write_string(writer, 'subnet_name', obj.subnet_name)
 2826        if obj.external_host_provider is not None:
 2827            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
 2828        writer.write_end()
 2829
 2830    @staticmethod
 2831    def write_many(objs, writer, singular=None, plural=None):
 2832        if singular is None:
 2833            singular = 'external_host_group'
 2834        if plural is None:
 2835            plural = 'external_host_groups'
 2836        writer.write_start(plural)
 2837        if type(objs) == List:
 2838            href = objs.href
 2839            if href is not None:
 2840                writer.write_attribute('href', href)
 2841        for obj in objs:
 2842            ExternalHostGroupWriter.write_one(obj, writer, singular)
 2843        writer.write_end()
 2844
 2845
 2846class ExternalHostProviderWriter(Writer):
 2847
 2848    def __init__(self):
 2849        super(ExternalHostProviderWriter, self).__init__()
 2850
 2851    @staticmethod
 2852    def write_one(obj, writer, singular=None):
 2853        if singular is None:
 2854            singular = 'external_host_provider'
 2855        writer.write_start(singular)
 2856        href = obj.href
 2857        if href is not None:
 2858            writer.write_attribute('href', href)
 2859        if obj.id is not None:
 2860            writer.write_attribute('id', obj.id)
 2861        if obj.authentication_url is not None:
 2862            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
 2863        if obj.comment is not None:
 2864            Writer.write_string(writer, 'comment', obj.comment)
 2865        if obj.description is not None:
 2866            Writer.write_string(writer, 'description', obj.description)
 2867        if obj.name is not None:
 2868            Writer.write_string(writer, 'name', obj.name)
 2869        if obj.password is not None:
 2870            Writer.write_string(writer, 'password', obj.password)
 2871        if obj.properties is not None:
 2872            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
 2873        if obj.requires_authentication is not None:
 2874            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
 2875        if obj.url is not None:
 2876            Writer.write_string(writer, 'url', obj.url)
 2877        if obj.username is not None:
 2878            Writer.write_string(writer, 'username', obj.username)
 2879        if obj.certificates is not None:
 2880            CertificateWriter.write_many(obj.certificates, writer, 'certificate', 'certificates')
 2881        if obj.compute_resources is not None:
 2882            ExternalComputeResourceWriter.write_many(obj.compute_resources, writer, 'external_compute_resource', 'compute_resources')
 2883        if obj.discovered_hosts is not None:
 2884            ExternalDiscoveredHostWriter.write_many(obj.discovered_hosts, writer, 'external_discovered_host', 'discovered_hosts')
 2885        if obj.host_groups is not None:
 2886            ExternalHostGroupWriter.write_many(obj.host_groups, writer, 'external_host_group', 'host_groups')
 2887        if obj.hosts is not None:
 2888            HostWriter.write_many(obj.hosts, writer, 'host', 'hosts')
 2889        writer.write_end()
 2890
 2891    @staticmethod
 2892    def write_many(objs, writer, singular=None, plural=None):
 2893        if singular is None:
 2894            singular = 'external_host_provider'
 2895        if plural is None:
 2896            plural = 'external_host_providers'
 2897        writer.write_start(plural)
 2898        if type(objs) == List:
 2899            href = objs.href
 2900            if href is not None:
 2901                writer.write_attribute('href', href)
 2902        for obj in objs:
 2903            ExternalHostProviderWriter.write_one(obj, writer, singular)
 2904        writer.write_end()
 2905
 2906
 2907class ExternalNetworkProviderConfigurationWriter(Writer):
 2908
 2909    def __init__(self):
 2910        super(ExternalNetworkProviderConfigurationWriter, self).__init__()
 2911
 2912    @staticmethod
 2913    def write_one(obj, writer, singular=None):
 2914        if singular is None:
 2915            singular = 'external_network_provider_configuration'
 2916        writer.write_start(singular)
 2917        href = obj.href
 2918        if href is not None:
 2919            writer.write_attribute('href', href)
 2920        if obj.id is not None:
 2921            writer.write_attribute('id', obj.id)
 2922        if obj.comment is not None:
 2923            Writer.write_string(writer, 'comment', obj.comment)
 2924        if obj.description is not None:
 2925            Writer.write_string(writer, 'description', obj.description)
 2926        if obj.name is not None:
 2927            Writer.write_string(writer, 'name', obj.name)
 2928        if obj.external_network_provider is not None:
 2929            ExternalProviderWriter.write_one(obj.external_network_provider, writer, 'external_network_provider')
 2930        if obj.host is not None:
 2931            HostWriter.write_one(obj.host, writer, 'host')
 2932        writer.write_end()
 2933
 2934    @staticmethod
 2935    def write_many(objs, writer, singular=None, plural=None):
 2936        if singular is None:
 2937            singular = 'external_network_provider_configuration'
 2938        if plural is None:
 2939            plural = 'external_network_provider_configurations'
 2940        writer.write_start(plural)
 2941        if type(objs) == List:
 2942            href = objs.href
 2943            if href is not None:
 2944                writer.write_attribute('href', href)
 2945        for obj in objs:
 2946            ExternalNetworkProviderConfigurationWriter.write_one(obj, writer, singular)
 2947        writer.write_end()
 2948
 2949
 2950class ExternalProviderWriter(Writer):
 2951
 2952    def __init__(self):
 2953        super(ExternalProviderWriter, self).__init__()
 2954
 2955    @staticmethod
 2956    def write_one(obj, writer, singular=None):
 2957        if singular is None:
 2958            singular = 'external_provider'
 2959        writer.write_start(singular)
 2960        href = obj.href
 2961        if href is not None:
 2962            writer.write_attribute('href', href)
 2963        if obj.id is not None:
 2964            writer.write_attribute('id', obj.id)
 2965        if obj.authentication_url is not None:
 2966            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
 2967        if obj.comment is not None:
 2968            Writer.write_string(writer, 'comment', obj.comment)
 2969        if obj.description is not None:
 2970            Writer.write_string(writer, 'description', obj.description)
 2971        if obj.name is not None:
 2972            Writer.write_string(writer, 'name', obj.name)
 2973        if obj.password is not None:
 2974            Writer.write_string(writer, 'password', obj.password)
 2975        if obj.properties is not None:
 2976            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
 2977        if obj.requires_authentication is not None:
 2978            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
 2979        if obj.url is not None:
 2980            Writer.write_string(writer, 'url', obj.url)
 2981        if obj.username is not None:
 2982            Writer.write_string(writer, 'username', obj.username)
 2983        writer.write_end()
 2984
 2985    @staticmethod
 2986    def write_many(objs, writer, singular=None, plural=None):
 2987        if singular is None:
 2988            singular = 'external_provider'
 2989        if plural is None:
 2990            plural = 'external_providers'
 2991        writer.write_start(plural)
 2992        if type(objs) == List:
 2993            href = objs.href
 2994            if href is not None:
 2995                writer.write_attribute('href', href)
 2996        for obj in objs:
 2997            ExternalProviderWriter.write_one(obj, writer, singular)
 2998        writer.write_end()
 2999
 3000
 3001class ExternalTemplateImportWriter(Writer):
 3002
 3003    def __init__(self):
 3004        super(ExternalTemplateImportWriter, self).__init__()
 3005
 3006    @staticmethod
 3007    def write_one(obj, writer, singular=None):
 3008        if singular is None:
 3009            singular = 'external_template_import'
 3010        writer.write_start(singular)
 3011        href = obj.href
 3012        if href is not None:
 3013            writer.write_attribute('href', href)
 3014        if obj.clone is not None:
 3015            Writer.write_boolean(writer, 'clone', obj.clone)
 3016        if obj.url is not None:
 3017            Writer.write_string(writer, 'url', obj.url)
 3018        if obj.cluster is not None:
 3019            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
 3020        if obj.cpu_profile is not None:
 3021            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
 3022        if obj.host is not None:
 3023            HostWriter.write_one(obj.host, writer, 'host')
 3024        if obj.quota is not None:
 3025            QuotaWriter.write_one(obj.quota, writer, 'quota')
 3026        if obj.storage_domain is not None:
 3027            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
 3028        if obj.template is not None:
 3029            TemplateWriter.write_one(obj.template, writer, 'template')
 3030        writer.write_end()
 3031
 3032    @staticmethod
 3033    def write_many(objs, writer, singular=None, plural=None):
 3034        if singular is None:
 3035            singular = 'external_template_import'
 3036        if plural is None:
 3037            plural = 'external_template_imports'
 3038        writer.write_start(plural)
 3039        if type(objs) == List:
 3040            href = objs.href
 3041            if href is not None:
 3042                writer.write_attribute('href', href)
 3043        for obj in objs:
 3044            ExternalTemplateImportWriter.write_one(obj, writer, singular)
 3045        writer.write_end()
 3046
 3047
 3048class ExternalVmImportWriter(Writer):
 3049
 3050    def __init__(self):
 3051        super(ExternalVmImportWriter, self).__init__()
 3052
 3053    @staticmethod
 3054    def write_one(obj, writer, singular=None):
 3055        if singular is None:
 3056            singular = 'external_vm_import'
 3057        writer.write_start(singular)
 3058        href = obj.href
 3059        if href is not None:
 3060            writer.write_attribute('href', href)
 3061        if obj.name is not None:
 3062            Writer.write_string(writer, 'name', obj.name)
 3063        if obj.password is not None:
 3064            Writer.write_string(writer, 'password', obj.password)
 3065        if obj.provider is not None:
 3066            Writer.write_string(writer, 'provider', obj.provider.value)
 3067        if obj.sparse is not None:
 3068            Writer.write_boolean(writer, 'sparse', obj.sparse)
 3069        if obj.url is not None:
 3070            Writer.write_string(writer, 'url', obj.url)
 3071        if obj.username is not None:
 3072            Writer.write_string(writer, 'username', obj.username)
 3073        if obj.cluster is not None:
 3074            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
 3075        if obj.cpu_profile is not None:
 3076            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
 3077        if obj.drivers_iso is not None:
 3078            FileWriter.write_one(obj.drivers_iso, writer, 'drivers_iso')
 3079        if obj.host is not None:
 3080            HostWriter.write_one(obj.host, writer, 'host')
 3081        if obj.quota is not None:
 3082            QuotaWriter.write_one(obj.quota, writer, 'quota')
 3083        if obj.storage_domain is not None:
 3084            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
 3085        if obj.vm is not None:
 3086            VmWriter.write_one(obj.vm, writer, 'vm')
 3087        writer.write_end()
 3088
 3089    @staticmethod
 3090    def write_many(objs, writer, singular=None, plural=None):
 3091        if singular is None:
 3092            singular = 'external_vm_import'
 3093        if plural is None:
 3094            plural = 'external_vm_imports'
 3095        writer.write_start(plural)
 3096        if type(objs) == List:
 3097            href = objs.href
 3098            if href is not None:
 3099                writer.write_attribute('href', href)
 3100        for obj in objs:
 3101            ExternalVmImportWriter.write_one(obj, writer, singular)
 3102        writer.write_end()
 3103
 3104
 3105class FaultWriter(Writer):
 3106
 3107    def __init__(self):
 3108        super(FaultWriter, self).__init__()
 3109
 3110    @staticmethod
 3111    def write_one(obj, writer, singular=None):
 3112        if singular is None:
 3113            singular = 'fault'
 3114        writer.write_start(singular)
 3115        href = obj.href
 3116        if href is not None:
 3117            writer.write_attribute('href', href)
 3118        if obj.detail is not None:
 3119            Writer.write_string(writer, 'detail', obj.detail)
 3120        if obj.reason is not None:
 3121            Writer.write_string(writer, 'reason', obj.reason)
 3122        writer.write_end()
 3123
 3124    @staticmethod
 3125    def write_many(objs, writer, singular=None, plural=None):
 3126        if singular is None:
 3127            singular = 'fault'
 3128        if plural is None:
 3129            plural = 'faults'
 3130        writer.write_start(plural)
 3131        if type(objs) == List:
 3132            href = objs.href
 3133            if href is not None:
 3134                writer.write_attribute('href', href)
 3135        for obj in objs:
 3136            FaultWriter.write_one(obj, writer, singular)
 3137        writer.write_end()
 3138
 3139
 3140class FencingPolicyWriter(Writer):
 3141
 3142    def __init__(self):
 3143        super(FencingPolicyWriter, self).__init__()
 3144
 3145    @staticmethod
 3146    def write_one(obj, writer, singular=None):
 3147        if singular is None:
 3148            singular = 'fencing_policy'
 3149        writer.write_start(singular)
 3150        href = obj.href
 3151        if href is not None:
 3152            writer.write_attribute('href', href)
 3153        if obj.enabled is not None:
 3154            Writer.write_boolean(writer, 'enabled', obj.enabled)
 3155        if obj.skip_if_connectivity_broken is not None:
 3156            SkipIfConnectivityBrokenWriter.write_one(obj.skip_if_connectivity_broken, writer, 'skip_if_connectivity_broken')
 3157        if obj.skip_if_gluster_bricks_up is not None:
 3158            Writer.write_boolean(writer, 'skip_if_gluster_bricks_up', obj.skip_if_gluster_bricks_up)
 3159        if obj.skip_if_gluster_quorum_not_met is not None:
 3160            Writer.write_boolean(writer, 'skip_if_gluster_quorum_not_met', obj.skip_if_gluster_quorum_not_met)
 3161        if obj.skip_if_sd_active is not None:
 3162            SkipIfSdActiveWriter.write_one(obj.skip_if_sd_active, writer, 'skip_if_sd_active')
 3163        writer.write_end()
 3164
 3165    @staticmethod
 3166    def write_many(objs, writer, singular=None, plural=None):
 3167        if singular is None:
 3168            singular = 'fencing_policy'
 3169        if plural is None:
 3170            plural = 'fencing_policies'
 3171        writer.write_start(plural)
 3172        if type(objs) == List:
 3173            href = objs.href
 3174            if href is not None:
 3175                writer.write_attribute('href', href)
 3176        for obj in objs:
 3177            FencingPolicyWriter.write_one(obj, writer, singular)
 3178        writer.write_end()
 3179
 3180
 3181class FileWriter(Writer):
 3182
 3183    def __init__(self):
 3184        super(FileWriter, self).__init__()
 3185
 3186    @staticmethod
 3187    def write_one(obj, writer, singular=None):
 3188        if singular is None:
 3189            singular = 'file'
 3190        writer.write_start(singular)
 3191        href = obj.href
 3192        if href is not None:
 3193            writer.write_attribute('href', href)
 3194        if obj.id is not None:
 3195            writer.write_attribute('id', obj.id)
 3196        if obj.comment is not None:
 3197            Writer.write_string(writer, 'comment', obj.comment)
 3198        if obj.content is not None:
 3199            Writer.write_string(writer, 'content', obj.content)
 3200        if obj.description is not None:
 3201            Writer.write_string(writer, 'description', obj.description)
 3202        if obj.name is not None:
 3203            Writer.write_string(writer, 'name', obj.name)
 3204        if obj.type is not None:
 3205            Writer.write_string(writer, 'type', obj.type)
 3206        if obj.storage_domain is not None:
 3207            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
 3208        writer.write_end()
 3209
 3210    @staticmethod
 3211    def write_many(objs, writer, singular=None, plural=None):
 3212        if singular is None:
 3213            singular = 'file'
 3214        if plural is None:
 3215            plural = 'files'
 3216        writer.write_start(plural)
 3217        if type(objs) == List:
 3218            href = objs.href
 3219            if href is not None:
 3220                writer.write_attribute('href', href)
 3221        for obj in objs:
 3222            FileWriter.write_one(obj, writer, singular)
 3223        writer.write_end()
 3224
 3225
 3226class FilterWriter(Writer):
 3227
 3228    def __init__(self):
 3229        super(FilterWriter, self).__init__()
 3230
 3231    @staticmethod
 3232    def write_one(obj, writer, singular=None):
 3233        if singular is None:
 3234            singular = 'filter'
 3235        writer.write_start(singular)
 3236        href = obj.href
 3237        if href is not None:
 3238            writer.write_attribute('href', href)
 3239        if obj.id is not None:
 3240            writer.write_attribute('id', obj.id)
 3241        if obj.comment is not None:
 3242            Writer.write_string(writer, 'comment', obj.comment)
 3243        if obj.description is not None:
 3244            Writer.write_string(writer, 'description', obj.description)
 3245        if obj.name is not None:
 3246            Writer.write_string(writer, 'name', obj.name)
 3247        if obj.position is not None:
 3248            Writer.write_integer(writer, 'position', obj.position)
 3249        if obj.scheduling_policy_unit is not None:
 3250            SchedulingPolicyUnitWriter.write_one(obj.scheduling_policy_unit, writer, 'scheduling_policy_unit')
 3251        writer.write_end()
 3252
 3253    @staticmethod
 3254    def write_many(objs, writer, singular=None, plural=None):
 3255        if singular is None:
 3256            singular = 'filter'
 3257        if plural is None:
 3258            plural = 'filters'
 3259        writer.write_start(plural)
 3260        if type(objs) == List:
 3261            href = objs.href
 3262            if href is not None:
 3263                writer.write_attribute('href', href)
 3264        for obj in objs:
 3265            FilterWriter.write_one(obj, writer, singular)
 3266        writer.write_end()
 3267
 3268
 3269class FloppyWriter(Writer):
 3270
 3271    def __init__(self):
 3272        super(FloppyWriter, self).__init__()
 3273
 3274    @staticmethod
 3275    def write_one(obj, writer, singular=None):
 3276        if singular is None:
 3277            singular = 'floppy'
 3278        writer.write_start(singular)
 3279        href = obj.href
 3280        if href is not None:
 3281            writer.write_attribute('href', href)
 3282        if obj.id is not None:
 3283            writer.write_attribute('id', obj.id)
 3284        if obj.comment is not None:
 3285            Writer.write_string(writer, 'comment', obj.comment)
 3286        if obj.description is not None:
 3287            Writer.write_string(writer, 'description', obj.description)
 3288        if obj.file is not None:
 3289            FileWriter.write_one(obj.file, writer, 'file')
 3290        if obj.name is not None:
 3291            Writer.write_string(writer, 'name', obj.name)
 3292        if obj.instance_type is not None:
 3293            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
 3294        if obj.template is not None:
 3295            TemplateWriter.write_one(obj.template, writer, 'template')
 3296        if obj.vm is not None:
 3297            VmWriter.write_one(obj.vm, writer, 'vm')
 3298        if obj.vms is not None:
 3299            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
 3300        writer.write_end()
 3301
 3302    @staticmethod
 3303    def write_many(objs, writer, singular=None, plural=None):
 3304        if singular is None:
 3305            singular = 'floppy'
 3306        if plural is None:
 3307            plural = 'floppies'
 3308        writer.write_start(plural)
 3309        if type(objs) == List:
 3310            href = objs.href
 3311            if href is not None:
 3312                writer.write_attribute('href', href)
 3313        for obj in objs:
 3314            FloppyWriter.write_one(obj, writer, singular)
 3315        writer.write_end()
 3316
 3317
 3318class FopStatisticWriter(Writer):
 3319
 3320    def __init__(self):
 3321        super(FopStatisticWriter, self).__init__()
 3322
 3323    @staticmethod
 3324    def write_one(obj, writer, singular=None):
 3325        if singular is None:
 3326            singular = 'fop_statistic'
 3327        writer.write_start(singular)
 3328        href = obj.href
 3329        if href is not None:
 3330            writer.write_attribute('href', href)
 3331        if obj.name is not None:
 3332            Writer.write_string(writer, 'name', obj.name)
 3333        if obj.statistics is not None:
 3334            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
 3335        writer.write_end()
 3336
 3337    @staticmethod
 3338    def write_many(objs, writer, singular=None, plural=None):
 3339        if singular is None:
 3340            singular = 'fop_statistic'
 3341        if plural is None:
 3342            plural = 'fop_statistics'
 3343        writer.write_start(plural)
 3344        if type(objs) == List:
 3345            href = objs.href
 3346            if href is not None:
 3347                writer.write_attribute('href', href)
 3348        for obj in objs:
 3349            FopStatisticWriter.write_one(obj, writer, singular)
 3350        writer.write_end()
 3351
 3352
 3353class GlusterBrickWriter(Writer):
 3354
 3355    def __init__(self):
 3356        super(GlusterBrickWriter, self).__init__()
 3357
 3358    @staticmethod
 3359    def write_one(obj, writer, singular=None):
 3360        if singular is None:
 3361            singular = 'brick'
 3362        writer.write_start(singular)
 3363        href = obj.href
 3364        if href is not None:
 3365            writer.write_attribute('href', href)
 3366        if obj.id is not None:
 3367            writer.write_attribute('id', obj.id)
 3368        if obj.brick_dir is not None:
 3369            Writer.write_string(writer, 'brick_dir', obj.brick_dir)
 3370        if obj.comment is not None:
 3371            Writer.write_string(writer, 'comment', obj.comment)
 3372        if obj.description is not None:
 3373            Writer.write_string(writer, 'description', obj.description)
 3374        if obj.device is not None:
 3375            Writer.write_string(writer, 'device', obj.device)
 3376        if obj.fs_name is not None:
 3377            Writer.write_string(writer, 'fs_name', obj.fs_name)
 3378        if obj.gluster_clients is not None:
 3379            GlusterClientWriter.write_many(obj.gluster_clients, writer, 'gluster_client', 'gluster_clients')
 3380        if obj.memory_pools is not None:
 3381            GlusterMemoryPoolWriter.write_many(obj.memory_pools, writer, 'memory_pool', 'memory_pools')
 3382        if obj.mnt_options is not None:
 3383            Writer.write_string(writer, 'mnt_options', obj.mnt_options)
 3384        if obj.name is not None:
 3385            Writer.write_string(writer, 'name', obj.name)
 3386        if obj.pid is not None:
 3387            Writer.write_integer(writer, 'pid', obj.pid)
 3388        if obj.port is not None:
 3389            Writer.write_integer(writer, 'port', obj.port)
 3390        if obj.server_id is not None:
 3391            Writer.write_string(writer, 'server_id', obj.server_id)
 3392        if obj.status is not None:
 3393            Writer.write_string(writer, 'status', obj.status.value)
 3394        if obj.gluster_volume is not None:
 3395            GlusterVolumeWriter.write_one(obj.gluster_volume, writer, 'gluster_volume')
 3396        if obj.instance_type is not None:
 3397            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
 3398        if obj.statistics is not None:
 3399            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
 3400        if obj.template is not None:
 3401            TemplateWriter.write_one(obj.template, writer, 'template')
 3402        if obj.vm is not None:
 3403            VmWriter.write_one(obj.vm, writer, 'vm')
 3404        if obj.vms is not None:
 3405            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
 3406        writer.write_end()
 3407
 3408    @staticmethod
 3409    def write_many(objs, writer, singular=None, plural=None):
 3410        if singular is None:
 3411            singular = 'brick'
 3412        if plural is None:
 3413            plural = 'bricks'
 3414        writer.write_start(plural)
 3415        if type(objs) == List:
 3416            href = objs.href
 3417            if href is not None:
 3418                writer.write_attribute('href', href)
 3419        for obj in objs:
 3420            GlusterBrickWriter.write_one(obj, writer, singular)
 3421        writer.write_end()
 3422
 3423
 3424class GlusterBrickAdvancedDetailsWriter(Writer):
 3425
 3426    def __init__(self):
 3427        super(GlusterBrickAdvancedDetailsWriter, self).__init__()
 3428
 3429    @staticmethod
 3430    def write_one(obj, writer, singular=None):
 3431        if singular is None:
 3432            singular = 'gluster_brick_advanced_details'
 3433        writer.write_start(singular)
 3434        href = obj.href
 3435        if href is not None:
 3436            writer.write_attribute('href', href)
 3437        if obj.id is not None:
 3438            writer.write_attribute('id', obj.id)
 3439        if obj.comment is not None:
 3440            Writer.write_string(writer, 'comment', obj.comment)
 3441        if obj.description is not None:
 3442            Writer.write_string(writer, 'description', obj.description)
 3443        if obj.device is not None:
 3444            Writer.write_string(writer, 'device', obj.device)
 3445        if obj.fs_name is not None:
 3446            Writer.write_string(writer, 'fs_name', obj.fs_name)
 3447        if obj.gluster_clients is not None:
 3448            GlusterClientWriter.write_many(obj.gluster_clients, writer, 'gluster_client', 'gluster_clients')
 3449        if obj.memory_pools is not None:
 3450            GlusterMemoryPoolWriter.write_many(obj.memory_pools, writer, 'memory_pool', 'memory_pools')
 3451        if obj.mnt_options is not None:
 3452            Writer.write_string(writer, 'mnt_options', obj.mnt_options)
 3453        if obj.name is not None:
 3454            Writer.write_string(writer, 'name', obj.name)
 3455        if obj.pid is not None:
 3456            Writer.write_integer(writer, 'pid', obj.pid)
 3457        if obj.port is not None:
 3458            Writer.write_integer(writer, 'port', obj.port)
 3459        if obj.instance_type is not None:
 3460            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
 3461        if obj.template is not None:
 3462            TemplateWriter.write_one(obj.template, writer, 'template')
 3463        if obj.vm is not None:
 3464            VmWriter.write_one(obj.vm, writer, 'vm')
 3465        if obj.vms is not None:
 3466            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
 3467        writer.write_end()
 3468
 3469    @staticmethod
 3470    def write_many(objs, writer, singular=None, plural=None):
 3471        if singular is None:
 3472            singular = 'gluster_brick_advanced_details'
 3473        if plural is None:
 3474            plural = 'gluster_brick_advanced_detailss'
 3475        writer.write_start(plural)
 3476        if type(objs) == List:
 3477            href = objs.href
 3478            if href is not None:
 3479                writer.write_attribute('href', href)
 3480        for obj in objs:
 3481            GlusterBrickAdvancedDetailsWriter.write_one(obj, writer, singular)
 3482        writer.write_end()
 3483
 3484
 3485class GlusterBrickMemoryInfoWriter(Writer):
 3486
 3487    def __init__(self):
 3488        super(GlusterBrickMemoryInfoWriter, self).__init__()
 3489
 3490    @staticmethod
 3491    def write_one(obj, writer, singular=None):
 3492        if singular is None:
 3493            singular = 'brick_memoryinfo'
 3494        writer.write_start(singular)
 3495        href = obj.href
 3496        if href is not None:
 3497            writer.write_attribute('href', href)
 3498        if obj.memory_pools is not None:
 3499            GlusterMemoryPoolWriter.write_many(obj.memory_pools, writer, 'memory_pool', 'memory_pools')
 3500        writer.write_end()
 3501
 3502    @staticmethod
 3503    def write_many(objs, writer, singular=None, plural=None):
 3504        if singular is None:
 3505            singular = 'brick_memoryinfo'
 3506        if plural is None:
 3507            plural = 'gluster_brick_memory_infos'
 3508        writer.write_start(plural)
 3509        if type(objs) == List:
 3510            href = objs.href
 3511            if href is not None:
 3512                writer.write_attribute('href', href)
 3513        for obj in objs:
 3514            GlusterBrickMemoryInfoWriter.write_one(obj, writer, singular)
 3515        writer.write_end()
 3516
 3517
 3518class GlusterClientWriter(Writer):
 3519
 3520    def __init__(self):
 3521        super(GlusterClientWriter, self).__init__()
 3522
 3523    @staticmethod
 3524    def write_one(obj, writer, singular=None):
 3525        if singular is None:
 3526            singular = 'gluster_client'
 3527        writer.write_start(singular)
 3528        href = obj.href
 3529        if href is not None:
 3530            writer.write_attribute('href', href)
 3531        if obj.bytes_read is not None:
 3532            Writer.write_integer(writer, 'bytes_read', obj.bytes_read)
 3533        if obj.bytes_written is not None:
 3534            Writer.write_integer(writer, 'bytes_written', obj.bytes_written)
 3535        if obj.client_port is not None:
 3536            Writer.write_integer(writer, 'client_port', obj.client_port)
 3537        if obj.host_name is not None:
 3538            Writer.write_string(writer, 'host_name', obj.host_name)
 3539        writer.write_end()
 3540
 3541    @staticmethod
 3542    def write_many(objs, writer, singular=None, plural=None):
 3543        if singular is None:
 3544            singular = 'gluster_client'
 3545        if plural is None:
 3546            plural = 'gluster_clients'
 3547        writer.write_start(plural)
 3548        if type(objs) == List:
 3549            href = objs.href
 3550            if href is not None:
 3551                writer.write_attribute('href', href)
 3552        for obj in objs:
 3553            GlusterClientWriter.write_one(obj, writer, singular)
 3554        writer.write_end()
 3555
 3556
 3557class GlusterHookWriter(Writer):
 3558
 3559    def __init__(self):
 3560        super(GlusterHookWriter, self).__init__()
 3561
 3562    @staticmethod
 3563    def write_one(obj, writer, singular=None):
 3564        if singular is None:
 3565            singular = 'gluster_hook'
 3566        writer.write_start(singular)
 3567        href = obj.href
 3568        if href is not None:
 3569            writer.write_attribute('href', href)
 3570        if obj.id is not None:
 3571            writer.write_attribute('id', obj.id)
 3572        if obj.checksum is not None:
 3573            Writer.write_string(writer, 'checksum', obj.checksum)
 3574        if obj.comment is not None:
 3575            Writer.write_string(writer, 'comment', obj.comment)
 3576        if obj.conflict_status is not None:
 3577            Writer.write_integer(writer, 'conflict_status', obj.conflict_status)
 3578        if obj.conflicts is not None:
 3579            Writer.write_string(writer, 'conflicts', obj.conflicts)
 3580        if obj.content is not None:
 3581            Writer.write_string(writer, 'content', obj.content)
 3582        if obj.content_type is not None:
 3583            Writer.write_string(writer, 'content_type', obj.content_type.value)
 3584        if obj.description is not None:
 3585            Writer.write_string(writer, 'description', obj.description)
 3586        if obj.gluster_command is not None:
 3587            Writer.write_string(writer, 'gluster_command', obj.gluster_command)
 3588        if obj.name is not None:
 3589            Writer.write_string(writer, 'name', obj.name)
 3590        if obj.stage is not None:
 3591            Writer.write_string(writer, 'stage', obj.stage.value)
 3592        if obj.status is not None:
 3593            Writer.write_string(writer, 'status', obj.status.value)
 3594        if obj.cluster is not None:
 3595            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
 3596        if obj.server_hooks is not None:
 3597            GlusterServerHookWriter.write_many(obj.server_hooks, writer, 'server_hook', 'server_hooks')
 3598        writer.write_end()
 3599
 3600    @staticmethod
 3601    def write_many(objs, writer, singular=None, plural=None):
 3602        if singular is None:
 3603            singular = 'gluster_hook'
 3604        if plural is None:
 3605            plural = 'gluster_hooks'
 3606        writer.write_start(plural)
 3607        if type(objs) == List:
 3608            href = objs.href
 3609            if href is not None:
 3610                writer.write_attribute('href', href)
 3611        for obj in objs:
 3612            GlusterHookWriter.write_one(obj, writer, singular)
 3613        writer.write_end()
 3614
 3615
 3616class GlusterMemoryPoolWriter(Writer):
 3617
 3618    def __init__(self):
 3619        super(GlusterMemoryPoolWriter, self).__init__()
 3620
 3621    @staticmethod
 3622    def write_one(obj, writer, singular=None):
 3623        if singular is None:
 3624            singular = 'memory_pool'
 3625        writer.write_start(singular)
 3626        href = obj.href
 3627        if href is not None:
 3628            writer.write_attribute('href', href)
 3629        if obj.id is not None:
 3630            writer.write_attribute('id', obj.id)
 3631        if obj.alloc_count is not None:
 3632            Writer.write_integer(writer, 'alloc_count', obj.alloc_count)
 3633        if obj.cold_count is not None:
 3634            Writer.write_integer(writer, 'cold_count', obj.cold_count)
 3635        if obj.comment is not None:
 3636            Writer.write_string(writer, 'comment', obj.comment)
 3637        if obj.description is not None:
 3638            Writer.write_string(writer, 'description', obj.description)
 3639        if obj.hot_count is not None:
 3640            Writer.write_integer(writer, 'hot_count', obj.hot_count)
 3641        if obj.max_alloc is not None:
 3642            Writer.write_integer(writer, 'max_alloc', obj.max_alloc)
 3643        if obj.max_stdalloc is not None:
 3644            Writer.write_integer(writer, 'max_stdalloc', obj.max_stdalloc)
 3645        if obj.name is not None:
 3646            Writer.write_string(writer, 'name', obj.name)
 3647        if obj.padded_size is not None:
 3648            Writer.write_integer(writer, 'padded_size', obj.padded_size)
 3649        if obj.pool_misses is not None:
 3650            Writer.write_integer(writer, 'pool_misses', obj.pool_misses)
 3651        if obj.type is not None:
 3652            Writer.write_string(writer, 'type', obj.type)
 3653        writer.write_end()
 3654
 3655    @staticmethod
 3656    def write_many(objs, writer, singular=None, plural=None):
 3657        if singular is None:
 3658            singular = 'memory_pool'
 3659        if plural is None:
 3660            plural = 'memory_pools'
 3661        writer.write_start(plural)
 3662        if type(objs) == List:
 3663            href = objs.href
 3664            if href is not None:
 3665                writer.write_attribute('href', href)
 3666        for obj in objs:
 3667            GlusterMemoryPoolWriter.write_one(obj, writer, singular)
 3668        writer.write_end()
 3669
 3670
 3671class GlusterServerHookWriter(Writer):
 3672
 3673    def __init__(self):
 3674        super(GlusterServerHookWriter, self).__init__()
 3675
 3676    @staticmethod
 3677    def write_one(obj, writer, singular=None):
 3678        if singular is None:
 3679            singular = 'server_hook'
 3680        writer.write_start(singular)
 3681        href = obj.href
 3682        if href is not None:
 3683            writer.write_attribute('href', href)
 3684        if obj.id is not None:
 3685            writer.write_attribute('id', obj.id)
 3686        if obj.checksum is not None:
 3687            Writer.write_string(writer, 'checksum', obj.checksum)
 3688        if obj.comment is not None:
 3689            Writer.write_string(writer, 'comment', obj.comment)
 3690        if obj.content_type is not None:
 3691            Writer.write_string(writer, 'content_type', obj.content_type.value)
 3692        if obj.description is not None:
 3693            Writer.write_string(writer, 'description', obj.description)
 3694        if obj.name is not None:
 3695            Writer.write_string(writer, 'name', obj.name)
 3696        if obj.status is not None:
 3697            Writer.write_string(writer, 'status', obj.status.value)
 3698        if obj.host is not None:
 3699            HostWriter.write_one(obj.host, writer, 'host')
 3700        writer.write_end()
 3701
 3702    @staticmethod
 3703    def write_many(objs, writer, singular=None, plural=None):
 3704        if singular is None:
 3705            singular = 'server_hook'
 3706        if plural is None:
 3707            plural = 'server_hooks'
 3708        writer.write_start(plural)
 3709        if type(objs) == List:
 3710            href = objs.href
 3711            if href is not None:
 3712                writer.write_attribute('href', href)
 3713        for obj in objs:
 3714            GlusterServerHookWriter.write_one(obj, writer, singular)
 3715        writer.write_end()
 3716
 3717
 3718class GlusterVolumeWriter(Writer):
 3719
 3720    def __init__(self):
 3721        super(GlusterVolumeWriter, self).__init__()
 3722
 3723    @staticmethod
 3724    def write_one(obj, writer, singular=None):
 3725        if singular is None:
 3726            singular = 'gluster_volume'
 3727        writer.write_start(singular)
 3728        href = obj.href
 3729        if href is not None:
 3730            writer.write_attribute('href', href)
 3731        if obj.id is not None:
 3732            writer.write_attribute('id', obj.id)
 3733        if obj.comment is not None:
 3734            Writer.write_string(writer, 'comment', obj.comment)
 3735        if obj.description is not None:
 3736            Writer.write_string(writer, 'description', obj.description)
 3737        if obj.disperse_count is not None:
 3738            Writer.write_integer(writer, 'disperse_count', obj.disperse_count)
 3739        if obj.name is not None:
 3740            Writer.write_string(writer, 'name', obj.name)
 3741        if obj.options is not None:
 3742            OptionWriter.write_many(obj.options, writer, 'option', 'options')
 3743        if obj.redundancy_count is not None:
 3744            Writer.write_integer(writer, 'redundancy_count', obj.redundancy_count)
 3745        if obj.replica_count is not None:
 3746            Writer.write_integer(writer, 'replica_count', obj.replica_count)
 3747        if obj.status is not None:
 3748            Writer.write_string(writer, 'status', obj.status.value)
 3749        if obj.stripe_count is not None:
 3750            Writer.write_integer(writer, 'stripe_count', obj.stripe_count)
 3751        if obj.transport_types is not None:
 3752            writer.write_start('transport_types')
 3753            for item in obj.transport_types:
 3754                if item is not None:
 3755                    Writer.write_string(writer, 'transport_type', item.value)
 3756            writer.write_end()
 3757        if obj.volume_type is not None:
 3758            Writer.write_string(writer, 'volume_type', obj.volume_type.value)
 3759        if obj.bricks is not None:
 3760            GlusterBrickWriter.write_many(obj.bricks, writer, 'brick', 'bricks')
 3761        if obj.cluster is not None:
 3762            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
 3763        if obj.statistics is not None:
 3764            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
 3765        writer.write_end()
 3766
 3767    @staticmethod
 3768    def write_many(objs, writer, singular=None, plural=None):
 3769        if singular is None:
 3770            singular = 'gluster_volume'
 3771        if plural is None:
 3772            plural = 'gluster_volumes'
 3773        writer.write_start(plural)
 3774        if type(objs) == List:
 3775            href = objs.href
 3776            if href is not None:
 3777                writer.write_attribute('href', href)
 3778        for obj in objs:
 3779            GlusterVolumeWriter.write_one(obj, writer, singular)
 3780        writer.write_end()
 3781
 3782
 3783class GlusterVolumeProfileDetailsWriter(Writer):
 3784
 3785    def __init__(self):
 3786        super(GlusterVolumeProfileDetailsWriter, self).__init__()
 3787
 3788    @staticmethod
 3789    def write_one(obj, writer, singular=None):
 3790        if singular is None:
 3791            singular = 'gluster_volume_profile_details'
 3792        writer.write_start(singular)
 3793        href = obj.href
 3794        if href is not None:
 3795            writer.write_attribute('href', href)
 3796        if obj.id is not None:
 3797            writer.write_attribute('id', obj.id)
 3798        if obj.brick_profile_details is not None:
 3799            BrickProfileDetailWriter.write_many(obj.brick_profile_details, writer, 'brick_profile_detail', 'brick_profile_details')
 3800        if obj.comment is not None:
 3801            Writer.write_string(writer, 'comment', obj.comment)
 3802        if obj.description is not None:
 3803            Writer.write_string(writer, 'description', obj.description)
 3804        if obj.name is not None:
 3805            Writer.write_string(writer, 'name', obj.name)
 3806        if obj.nfs_profile_details is not None:
 3807            NfsProfileDetailWriter.write_many(obj.nfs_profile_details, writer, 'nfs_profile_detail', 'nfs_profile_details')
 3808        writer.write_end()
 3809
 3810    @staticmethod
 3811    def write_many(objs, writer, singular=None, plural=None):
 3812        if singular is None:
 3813            singular = 'gluster_volume_profile_details'
 3814        if plural is None:
 3815            plural = 'gluster_volume_profile_detailss'
 3816        writer.write_start(plural)
 3817        if type(objs) == List:
 3818            href = objs.href
 3819            if href is not None:
 3820                writer.write_attribute('href', href)
 3821        for obj in objs:
 3822            GlusterVolumeProfileDetailsWriter.write_one(obj, writer, singular)
 3823        writer.write_end()
 3824
 3825
 3826class GracePeriodWriter(Writer):
 3827
 3828    def __init__(self):
 3829        super(GracePeriodWriter, self).__init__()
 3830
 3831    @staticmethod
 3832    def write_one(obj, writer, singular=None):
 3833        if singular is None:
 3834            singular = 'grace_period'
 3835        writer.write_start(singular)
 3836        href = obj.href
 3837        if href is not None:
 3838            writer.write_attribute('href', href)
 3839        if obj.expiry is not None:
 3840            Writer.write_integer(writer, 'expiry', obj.expiry)
 3841        writer.write_end()
 3842
 3843    @staticmethod
 3844    def write_many(objs, writer, singular=None, plural=None):
 3845        if singular is None:
 3846            singular = 'grace_period'
 3847        if plural is None:
 3848            plural = 'grace_periods'
 3849        writer.write_start(plural)
 3850        if type(objs) == List:
 3851            href = objs.href
 3852            if href is not None:
 3853                writer.write_attribute('href', href)
 3854        for obj in objs:
 3855            GracePeriodWriter.write_one(obj, writer, singular)
 3856        writer.write_end()
 3857
 3858
 3859class GraphicsConsoleWriter(Writer):
 3860
 3861    def __init__(self):
 3862        super(GraphicsConsoleWriter, self).__init__()
 3863
 3864    @staticmethod
 3865    def write_one(obj, writer, singular=None):
 3866        if singular is None:
 3867            singular = 'graphics_console'
 3868        writer.write_start(singular)
 3869        href = obj.href
 3870        if href is not None:
 3871            writer.write_attribute('href', href)
 3872        if obj.id is not None:
 3873            writer.write_attribute('id', obj.id)
 3874        if obj.address is not None:
 3875            Writer.write_string(writer, 'address', obj.address)
 3876        if obj.comment is not None:
 3877            Writer.write_string(writer, 'comment', obj.comment)
 3878        if obj.description is not None:
 3879            Writer.write_string(writer, 'description', obj.description)
 3880        if obj.name is not None:
 3881            Writer.write_string(writer, 'name', obj.name)
 3882        if obj.port is not None:
 3883            Writer.write_integer(writer, 'port', obj.port)
 3884        if obj.protocol is not None:
 3885            Writer.write_string(writer, 'protocol', obj.protocol.value)
 3886        if obj.tls_port is not None:
 3887            Writer.write_integer(writer, 'tls_port', obj.tls_port)
 3888        if obj.instance_type is not None:
 3889            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
 3890        if obj.template is not None:
 3891            TemplateWriter.write_one(obj.template, writer, 'template')
 3892        if obj.vm is not None:
 3893            VmWriter.write_one(obj.vm, writer, 'vm')
 3894        writer.write_end()
 3895
 3896    @staticmethod
 3897    def write_many(objs, writer, singular=None, plural=None):
 3898        if singular is None:
 3899            singular = 'graphics_console'
 3900        if plural is None:
 3901            plural = 'graphics_consoles'
 3902        writer.write_start(plural)
 3903        if type(objs) == List:
 3904            href = objs.href
 3905            if href is not None:
 3906                writer.write_attribute('href', href)
 3907        for obj in objs:
 3908            GraphicsConsoleWriter.write_one(obj, writer, singular)
 3909        writer.write_end()
 3910
 3911
 3912class GroupWriter(Writer):
 3913
 3914    def __init__(self):
 3915        super(GroupWriter, self).__init__()
 3916
 3917    @staticmethod
 3918    def write_one(obj, writer, singular=None):
 3919        if singular is None:
 3920            singular = 'group'
 3921        writer.write_start(singular)
 3922        href = obj.href
 3923        if href is not None:
 3924            writer.write_attribute('href', href)
 3925        if obj.id is not None:
 3926            writer.write_attribute('id', obj.id)
 3927        if obj.comment is not None:
 3928            Writer.write_string(writer, 'comment', obj.comment)
 3929        if obj.description is not None:
 3930            Writer.write_string(writer, 'description', obj.description)
 3931        if obj.domain_entry_id is not None:
 3932            Writer.write_string(writer, 'domain_entry_id', obj.domain_entry_id)
 3933        if obj.name is not None:
 3934            Writer.write_string(writer, 'name', obj.name)
 3935        if obj.namespace is not None:
 3936            Writer.write_string(writer, 'namespace', obj.namespace)
 3937        if obj.domain is not None:
 3938            DomainWriter.write_one(obj.domain, writer, 'domain')
 3939        if obj.permissions is not None:
 3940            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 3941        if obj.roles is not None:
 3942            RoleWriter.write_many(obj.roles, writer, 'role', 'roles')
 3943        if obj.tags is not None:
 3944            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
 3945        writer.write_end()
 3946
 3947    @staticmethod
 3948    def write_many(objs, writer, singular=None, plural=None):
 3949        if singular is None:
 3950            singular = 'group'
 3951        if plural is None:
 3952            plural = 'groups'
 3953        writer.write_start(plural)
 3954        if type(objs) == List:
 3955            href = objs.href
 3956            if href is not None:
 3957                writer.write_attribute('href', href)
 3958        for obj in objs:
 3959            GroupWriter.write_one(obj, writer, singular)
 3960        writer.write_end()
 3961
 3962
 3963class GuestOperatingSystemWriter(Writer):
 3964
 3965    def __init__(self):
 3966        super(GuestOperatingSystemWriter, self).__init__()
 3967
 3968    @staticmethod
 3969    def write_one(obj, writer, singular=None):
 3970        if singular is None:
 3971            singular = 'guest_operating_system'
 3972        writer.write_start(singular)
 3973        href = obj.href
 3974        if href is not None:
 3975            writer.write_attribute('href', href)
 3976        if obj.architecture is not None:
 3977            Writer.write_string(writer, 'architecture', obj.architecture)
 3978        if obj.codename is not None:
 3979            Writer.write_string(writer, 'codename', obj.codename)
 3980        if obj.distribution is not None:
 3981            Writer.write_string(writer, 'distribution', obj.distribution)
 3982        if obj.family is not None:
 3983            Writer.write_string(writer, 'family', obj.family)
 3984        if obj.kernel is not None:
 3985            KernelWriter.write_one(obj.kernel, writer, 'kernel')
 3986        if obj.version is not None:
 3987            VersionWriter.write_one(obj.version, writer, 'version')
 3988        writer.write_end()
 3989
 3990    @staticmethod
 3991    def write_many(objs, writer, singular=None, plural=None):
 3992        if singular is None:
 3993            singular = 'guest_operating_system'
 3994        if plural is None:
 3995            plural = 'guest_operating_systems'
 3996        writer.write_start(plural)
 3997        if type(objs) == List:
 3998            href = objs.href
 3999            if href is not None:
 4000                writer.write_attribute('href', href)
 4001        for obj in objs:
 4002            GuestOperatingSystemWriter.write_one(obj, writer, singular)
 4003        writer.write_end()
 4004
 4005
 4006class HardwareInformationWriter(Writer):
 4007
 4008    def __init__(self):
 4009        super(HardwareInformationWriter, self).__init__()
 4010
 4011    @staticmethod
 4012    def write_one(obj, writer, singular=None):
 4013        if singular is None:
 4014            singular = 'hardware_information'
 4015        writer.write_start(singular)
 4016        href = obj.href
 4017        if href is not None:
 4018            writer.write_attribute('href', href)
 4019        if obj.family is not None:
 4020            Writer.write_string(writer, 'family', obj.family)
 4021        if obj.manufacturer is not None:
 4022            Writer.write_string(writer, 'manufacturer', obj.manufacturer)
 4023        if obj.product_name is not None:
 4024            Writer.write_string(writer, 'product_name', obj.product_name)
 4025        if obj.serial_number is not None:
 4026            Writer.write_string(writer, 'serial_number', obj.serial_number)
 4027        if obj.supported_rng_sources is not None:
 4028            writer.write_start('supported_rng_sources')
 4029            for item in obj.supported_rng_sources:
 4030                if item is not None:
 4031                    Writer.write_string(writer, 'supported_rng_source', item.value)
 4032            writer.write_end()
 4033        if obj.uuid is not None:
 4034            Writer.write_string(writer, 'uuid', obj.uuid)
 4035        if obj.version is not None:
 4036            Writer.write_string(writer, 'version', obj.version)
 4037        writer.write_end()
 4038
 4039    @staticmethod
 4040    def write_many(objs, writer, singular=None, plural=None):
 4041        if singular is None:
 4042            singular = 'hardware_information'
 4043        if plural is None:
 4044            plural = 'hardware_informations'
 4045        writer.write_start(plural)
 4046        if type(objs) == List:
 4047            href = objs.href
 4048            if href is not None:
 4049                writer.write_attribute('href', href)
 4050        for obj in objs:
 4051            HardwareInformationWriter.write_one(obj, writer, singular)
 4052        writer.write_end()
 4053
 4054
 4055class HighAvailabilityWriter(Writer):
 4056
 4057    def __init__(self):
 4058        super(HighAvailabilityWriter, self).__init__()
 4059
 4060    @staticmethod
 4061    def write_one(obj, writer, singular=None):
 4062        if singular is None:
 4063            singular = 'high_availability'
 4064        writer.write_start(singular)
 4065        href = obj.href
 4066        if href is not None:
 4067            writer.write_attribute('href', href)
 4068        if obj.enabled is not None:
 4069            Writer.write_boolean(writer, 'enabled', obj.enabled)
 4070        if obj.priority is not None:
 4071            Writer.write_integer(writer, 'priority', obj.priority)
 4072        writer.write_end()
 4073
 4074    @staticmethod
 4075    def write_many(objs, writer, singular=None, plural=None):
 4076        if singular is None:
 4077            singular = 'high_availability'
 4078        if plural is None:
 4079            plural = 'high_availabilities'
 4080        writer.write_start(plural)
 4081        if type(objs) == List:
 4082            href = objs.href
 4083            if href is not None:
 4084                writer.write_attribute('href', href)
 4085        for obj in objs:
 4086            HighAvailabilityWriter.write_one(obj, writer, singular)
 4087        writer.write_end()
 4088
 4089
 4090class HookWriter(Writer):
 4091
 4092    def __init__(self):
 4093        super(HookWriter, self).__init__()
 4094
 4095    @staticmethod
 4096    def write_one(obj, writer, singular=None):
 4097        if singular is None:
 4098            singular = 'hook'
 4099        writer.write_start(singular)
 4100        href = obj.href
 4101        if href is not None:
 4102            writer.write_attribute('href', href)
 4103        if obj.id is not None:
 4104            writer.write_attribute('id', obj.id)
 4105        if obj.comment is not None:
 4106            Writer.write_string(writer, 'comment', obj.comment)
 4107        if obj.description is not None:
 4108            Writer.write_string(writer, 'description', obj.description)
 4109        if obj.event_name is not None:
 4110            Writer.write_string(writer, 'event_name', obj.event_name)
 4111        if obj.md5 is not None:
 4112            Writer.write_string(writer, 'md5', obj.md5)
 4113        if obj.name is not None:
 4114            Writer.write_string(writer, 'name', obj.name)
 4115        if obj.host is not None:
 4116            HostWriter.write_one(obj.host, writer, 'host')
 4117        writer.write_end()
 4118
 4119    @staticmethod
 4120    def write_many(objs, writer, singular=None, plural=None):
 4121        if singular is None:
 4122            singular = 'hook'
 4123        if plural is None:
 4124            plural = 'hooks'
 4125        writer.write_start(plural)
 4126        if type(objs) == List:
 4127            href = objs.href
 4128            if href is not None:
 4129                writer.write_attribute('href', href)
 4130        for obj in objs:
 4131            HookWriter.write_one(obj, writer, singular)
 4132        writer.write_end()
 4133
 4134
 4135class HostWriter(Writer):
 4136
 4137    def __init__(self):
 4138        super(HostWriter, self).__init__()
 4139
 4140    @staticmethod
 4141    def write_one(obj, writer, singular=None):
 4142        if singular is None:
 4143            singular = 'host'
 4144        writer.write_start(singular)
 4145        href = obj.href
 4146        if href is not None:
 4147            writer.write_attribute('href', href)
 4148        if obj.id is not None:
 4149            writer.write_attribute('id', obj.id)
 4150        if obj.address is not None:
 4151            Writer.write_string(writer, 'address', obj.address)
 4152        if obj.auto_numa_status is not None:
 4153            Writer.write_string(writer, 'auto_numa_status', obj.auto_numa_status.value)
 4154        if obj.certificate is not None:
 4155            CertificateWriter.write_one(obj.certificate, writer, 'certificate')
 4156        if obj.comment is not None:
 4157            Writer.write_string(writer, 'comment', obj.comment)
 4158        if obj.cpu is not None:
 4159            CpuWriter.write_one(obj.cpu, writer, 'cpu')
 4160        if obj.description is not None:
 4161            Writer.write_string(writer, 'description', obj.description)
 4162        if obj.device_passthrough is not None:
 4163            HostDevicePassthroughWriter.write_one(obj.device_passthrough, writer, 'device_passthrough')
 4164        if obj.display is not None:
 4165            DisplayWriter.write_one(obj.display, writer, 'display')
 4166        if obj.external_status is not None:
 4167            Writer.write_string(writer, 'external_status', obj.external_status.value)
 4168        if obj.hardware_information is not None:
 4169            HardwareInformationWriter.write_one(obj.hardware_information, writer, 'hardware_information')
 4170        if obj.hosted_engine is not None:
 4171            HostedEngineWriter.write_one(obj.hosted_engine, writer, 'hosted_engine')
 4172        if obj.iscsi is not None:
 4173            IscsiDetailsWriter.write_one(obj.iscsi, writer, 'iscsi')
 4174        if obj.kdump_status is not None:
 4175            Writer.write_string(writer, 'kdump_status', obj.kdump_status.value)
 4176        if obj.ksm is not None:
 4177            KsmWriter.write_one(obj.ksm, writer, 'ksm')
 4178        if obj.libvirt_version is not None:
 4179            VersionWriter.write_one(obj.libvirt_version, writer, 'libvirt_version')
 4180        if obj.max_scheduling_memory is not None:
 4181            Writer.write_integer(writer, 'max_scheduling_memory', obj.max_scheduling_memory)
 4182        if obj.memory is not None:
 4183            Writer.write_integer(writer, 'memory', obj.memory)
 4184        if obj.name is not None:
 4185            Writer.write_string(writer, 'name', obj.name)
 4186        if obj.network_operation_in_progress is not None:
 4187            Writer.write_boolean(writer, 'network_operation_in_progress', obj.network_operation_in_progress)
 4188        if obj.numa_supported is not None:
 4189            Writer.write_boolean(writer, 'numa_supported', obj.numa_supported)
 4190        if obj.os is not None:
 4191            OperatingSystemWriter.write_one(obj.os, writer, 'os')
 4192        if obj.override_iptables is not None:
 4193            Writer.write_boolean(writer, 'override_iptables', obj.override_iptables)
 4194        if obj.ovn_configured is not None:
 4195            Writer.write_boolean(writer, 'ovn_configured', obj.ovn_configured)
 4196        if obj.port is not None:
 4197            Writer.write_integer(writer, 'port', obj.port)
 4198        if obj.power_management is not None:
 4199            PowerManagementWriter.write_one(obj.power_management, writer, 'power_management')
 4200        if obj.protocol is not None:
 4201            Writer.write_string(writer, 'protocol', obj.protocol.value)
 4202        if obj.reinstallation_required is not None:
 4203            Writer.write_boolean(writer, 'reinstallation_required', obj.reinstallation_required)
 4204        if obj.root_password is not None:
 4205            Writer.write_string(writer, 'root_password', obj.root_password)
 4206        if obj.se_linux is not None:
 4207            SeLinuxWriter.write_one(obj.se_linux, writer, 'se_linux')
 4208        if obj.spm is not None:
 4209            SpmWriter.write_one(obj.spm, writer, 'spm')
 4210        if obj.ssh is not None:
 4211            SshWriter.write_one(obj.ssh, writer, 'ssh')
 4212        if obj.status is not None:
 4213            Writer.write_string(writer, 'status', obj.status.value)
 4214        if obj.status_detail is not None:
 4215            Writer.write_string(writer, 'status_detail', obj.status_detail)
 4216        if obj.summary is not None:
 4217            VmSummaryWriter.write_one(obj.summary, writer, 'summary')
 4218        if obj.transparent_huge_pages is not None:
 4219            TransparentHugePagesWriter.write_one(obj.transparent_huge_pages, writer, 'transparent_hugepages')
 4220        if obj.type is not None:
 4221            Writer.write_string(writer, 'type', obj.type.value)
 4222        if obj.update_available is not None:
 4223            Writer.write_boolean(writer, 'update_available', obj.update_available)
 4224        if obj.version is not None:
 4225            VersionWriter.write_one(obj.version, writer, 'version')
 4226        if obj.vgpu_placement is not None:
 4227            Writer.write_string(writer, 'vgpu_placement', obj.vgpu_placement.value)
 4228        if obj.affinity_labels is not None:
 4229            AffinityLabelWriter.write_many(obj.affinity_labels, writer, 'affinity_label', 'affinity_labels')
 4230        if obj.agents is not None:
 4231            AgentWriter.write_many(obj.agents, writer, 'agent', 'agents')
 4232        if obj.cluster is not None:
 4233            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
 4234        if obj.cpu_units is not None:
 4235            HostCpuUnitWriter.write_many(obj.cpu_units, writer, 'host_cpu_unit', 'cpu_units')
 4236        if obj.devices is not None:
 4237            HostDeviceWriter.write_many(obj.devices, writer, 'host_device', 'devices')
 4238        if obj.external_host_provider is not None:
 4239            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
 4240        if obj.external_network_provider_configurations is not None:
 4241            ExternalNetworkProviderConfigurationWriter.write_many(obj.external_network_provider_configurations, writer, 'external_network_provider_configuration', 'external_network_provider_configurations')
 4242        if obj.hooks is not None:
 4243            HookWriter.write_many(obj.hooks, writer, 'hook', 'hooks')
 4244        if obj.katello_errata is not None:
 4245            KatelloErratumWriter.write_many(obj.katello_errata, writer, 'katello_erratum', 'katello_errata')
 4246        if obj.network_attachments is not None:
 4247            NetworkAttachmentWriter.write_many(obj.network_attachments, writer, 'network_attachment', 'network_attachments')
 4248        if obj.nics is not None:
 4249            HostNicWriter.write_many(obj.nics, writer, 'host_nic', 'nics')
 4250        if obj.numa_nodes is not None:
 4251            NumaNodeWriter.write_many(obj.numa_nodes, writer, 'host_numa_node', 'host_numa_nodes')
 4252        if obj.permissions is not None:
 4253            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 4254        if obj.statistics is not None:
 4255            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
 4256        if obj.storage_connection_extensions is not None:
 4257            StorageConnectionExtensionWriter.write_many(obj.storage_connection_extensions, writer, 'storage_connection_extension', 'storage_connection_extensions')
 4258        if obj.storages is not None:
 4259            HostStorageWriter.write_many(obj.storages, writer, 'host_storage', 'storages')
 4260        if obj.tags is not None:
 4261            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
 4262        if obj.unmanaged_networks is not None:
 4263            UnmanagedNetworkWriter.write_many(obj.unmanaged_networks, writer, 'unmanaged_network', 'unmanaged_networks')
 4264        writer.write_end()
 4265
 4266    @staticmethod
 4267    def write_many(objs, writer, singular=None, plural=None):
 4268        if singular is None:
 4269            singular = 'host'
 4270        if plural is None:
 4271            plural = 'hosts'
 4272        writer.write_start(plural)
 4273        if type(objs) == List:
 4274            href = objs.href
 4275            if href is not None:
 4276                writer.write_attribute('href', href)
 4277        for obj in objs:
 4278            HostWriter.write_one(obj, writer, singular)
 4279        writer.write_end()
 4280
 4281
 4282class HostCpuUnitWriter(Writer):
 4283
 4284    def __init__(self):
 4285        super(HostCpuUnitWriter, self).__init__()
 4286
 4287    @staticmethod
 4288    def write_one(obj, writer, singular=None):
 4289        if singular is None:
 4290            singular = 'host_cpu_unit'
 4291        writer.write_start(singular)
 4292        href = obj.href
 4293        if href is not None:
 4294            writer.write_attribute('href', href)
 4295        if obj.id is not None:
 4296            writer.write_attribute('id', obj.id)
 4297        if obj.comment is not None:
 4298            Writer.write_string(writer, 'comment', obj.comment)
 4299        if obj.core_id is not None:
 4300            Writer.write_integer(writer, 'core_id', obj.core_id)
 4301        if obj.cpu_id is not None:
 4302            Writer.write_integer(writer, 'cpu_id', obj.cpu_id)
 4303        if obj.description is not None:
 4304            Writer.write_string(writer, 'description', obj.description)
 4305        if obj.name is not None:
 4306            Writer.write_string(writer, 'name', obj.name)
 4307        if obj.runs_vdsm is not None:
 4308            Writer.write_boolean(writer, 'runs_vdsm', obj.runs_vdsm)
 4309        if obj.socket_id is not None:
 4310            Writer.write_integer(writer, 'socket_id', obj.socket_id)
 4311        if obj.vms is not None:
 4312            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
 4313        writer.write_end()
 4314
 4315    @staticmethod
 4316    def write_many(objs, writer, singular=None, plural=None):
 4317        if singular is None:
 4318            singular = 'host_cpu_unit'
 4319        if plural is None:
 4320            plural = 'host_cpu_units'
 4321        writer.write_start(plural)
 4322        if type(objs) == List:
 4323            href = objs.href
 4324            if href is not None:
 4325                writer.write_attribute('href', href)
 4326        for obj in objs:
 4327            HostCpuUnitWriter.write_one(obj, writer, singular)
 4328        writer.write_end()
 4329
 4330
 4331class HostDeviceWriter(Writer):
 4332
 4333    def __init__(self):
 4334        super(HostDeviceWriter, self).__init__()
 4335
 4336    @staticmethod
 4337    def write_one(obj, writer, singular=None):
 4338        if singular is None:
 4339            singular = 'host_device'
 4340        writer.write_start(singular)
 4341        href = obj.href
 4342        if href is not None:
 4343            writer.write_attribute('href', href)
 4344        if obj.id is not None:
 4345            writer.write_attribute('id', obj.id)
 4346        if obj.capability is not None:
 4347            Writer.write_string(writer, 'capability', obj.capability)
 4348        if obj.comment is not None:
 4349            Writer.write_string(writer, 'comment', obj.comment)
 4350        if obj.description is not None:
 4351            Writer.write_string(writer, 'description', obj.description)
 4352        if obj.driver is not None:
 4353            Writer.write_string(writer, 'driver', obj.driver)
 4354        if obj.iommu_group is not None:
 4355            Writer.write_integer(writer, 'iommu_group', obj.iommu_group)
 4356        if obj.m_dev_types is not None:
 4357            MDevTypeWriter.write_many(obj.m_dev_types, writer, 'm_dev_type', 'm_dev_types')
 4358        if obj.name is not None:
 4359            Writer.write_string(writer, 'name', obj.name)
 4360        if obj.physical_function is not None:
 4361            HostDeviceWriter.write_one(obj.physical_function, writer, 'physical_function')
 4362        if obj.placeholder is not None:
 4363            Writer.write_boolean(writer, 'placeholder', obj.placeholder)
 4364        if obj.product is not None:
 4365            ProductWriter.write_one(obj.product, writer, 'product')
 4366        if obj.vendor is not None:
 4367            VendorWriter.write_one(obj.vendor, writer, 'vendor')
 4368        if obj.virtual_functions is not None:
 4369            Writer.write_integer(writer, 'virtual_functions', obj.virtual_functions)
 4370        if obj.host is not None:
 4371            HostWriter.write_one(obj.host, writer, 'host')
 4372        if obj.parent_device is not None:
 4373            HostDeviceWriter.write_one(obj.parent_device, writer, 'parent_device')
 4374        if obj.vm is not None:
 4375            VmWriter.write_one(obj.vm, writer, 'vm')
 4376        writer.write_end()
 4377
 4378    @staticmethod
 4379    def write_many(objs, writer, singular=None, plural=None):
 4380        if singular is None:
 4381            singular = 'host_device'
 4382        if plural is None:
 4383            plural = 'host_devices'
 4384        writer.write_start(plural)
 4385        if type(objs) == List:
 4386            href = objs.href
 4387            if href is not None:
 4388                writer.write_attribute('href', href)
 4389        for obj in objs:
 4390            HostDeviceWriter.write_one(obj, writer, singular)
 4391        writer.write_end()
 4392
 4393
 4394class HostDevicePassthroughWriter(Writer):
 4395
 4396    def __init__(self):
 4397        super(HostDevicePassthroughWriter, self).__init__()
 4398
 4399    @staticmethod
 4400    def write_one(obj, writer, singular=None):
 4401        if singular is None:
 4402            singular = 'host_device_passthrough'
 4403        writer.write_start(singular)
 4404        href = obj.href
 4405        if href is not None:
 4406            writer.write_attribute('href', href)
 4407        if obj.enabled is not None:
 4408            Writer.write_boolean(writer, 'enabled', obj.enabled)
 4409        writer.write_end()
 4410
 4411    @staticmethod
 4412    def write_many(objs, writer, singular=None, plural=None):
 4413        if singular is None:
 4414            singular = 'host_device_passthrough'
 4415        if plural is None:
 4416            plural = 'host_device_passthroughs'
 4417        writer.write_start(plural)
 4418        if type(objs) == List:
 4419            href = objs.href
 4420            if href is not None:
 4421                writer.write_attribute('href', href)
 4422        for obj in objs:
 4423            HostDevicePassthroughWriter.write_one(obj, writer, singular)
 4424        writer.write_end()
 4425
 4426
 4427class HostNicWriter(Writer):
 4428
 4429    def __init__(self):
 4430        super(HostNicWriter, self).__init__()
 4431
 4432    @staticmethod
 4433    def write_one(obj, writer, singular=None):
 4434        if singular is None:
 4435            singular = 'host_nic'
 4436        writer.write_start(singular)
 4437        href = obj.href
 4438        if href is not None:
 4439            writer.write_attribute('href', href)
 4440        if obj.id is not None:
 4441            writer.write_attribute('id', obj.id)
 4442        if obj.ad_aggregator_id is not None:
 4443            Writer.write_integer(writer, 'ad_aggregator_id', obj.ad_aggregator_id)
 4444        if obj.base_interface is not None:
 4445            Writer.write_string(writer, 'base_interface', obj.base_interface)
 4446        if obj.bonding is not None:
 4447            BondingWriter.write_one(obj.bonding, writer, 'bonding')
 4448        if obj.boot_protocol is not None:
 4449            Writer.write_string(writer, 'boot_protocol', obj.boot_protocol.value)
 4450        if obj.bridged is not None:
 4451            Writer.write_boolean(writer, 'bridged', obj.bridged)
 4452        if obj.check_connectivity is not None:
 4453            Writer.write_boolean(writer, 'check_connectivity', obj.check_connectivity)
 4454        if obj.comment is not None:
 4455            Writer.write_string(writer, 'comment', obj.comment)
 4456        if obj.custom_configuration is not None:
 4457            Writer.write_boolean(writer, 'custom_configuration', obj.custom_configuration)
 4458        if obj.description is not None:
 4459            Writer.write_string(writer, 'description', obj.description)
 4460        if obj.ip is not None:
 4461            IpWriter.write_one(obj.ip, writer, 'ip')
 4462        if obj.ipv6 is not None:
 4463            IpWriter.write_one(obj.ipv6, writer, 'ipv6')
 4464        if obj.ipv6_boot_protocol is not None:
 4465            Writer.write_string(writer, 'ipv6_boot_protocol', obj.ipv6_boot_protocol.value)
 4466        if obj.mac is not None:
 4467            MacWriter.write_one(obj.mac, writer, 'mac')
 4468        if obj.mtu is not None:
 4469            Writer.write_integer(writer, 'mtu', obj.mtu)
 4470        if obj.name is not None:
 4471            Writer.write_string(writer, 'name', obj.name)
 4472        if obj.override_configuration is not None:
 4473            Writer.write_boolean(writer, 'override_configuration', obj.override_configuration)
 4474        if obj.properties is not None:
 4475            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
 4476        if obj.speed is not None:
 4477            Writer.write_integer(writer, 'speed', obj.speed)
 4478        if obj.status is not None:
 4479            Writer.write_string(writer, 'status', obj.status.value)
 4480        if obj.virtual_functions_configuration is not None:
 4481            HostNicVirtualFunctionsConfigurationWriter.write_one(obj.virtual_functions_configuration, writer, 'virtual_functions_configuration')
 4482        if obj.vlan is not None:
 4483            VlanWriter.write_one(obj.vlan, writer, 'vlan')
 4484        if obj.host is not None:
 4485            HostWriter.write_one(obj.host, writer, 'host')
 4486        if obj.network is not None:
 4487            NetworkWriter.write_one(obj.network, writer, 'network')
 4488        if obj.network_labels is not None:
 4489            NetworkLabelWriter.write_many(obj.network_labels, writer, 'network_label', 'network_labels')
 4490        if obj.physical_function is not None:
 4491            HostNicWriter.write_one(obj.physical_function, writer, 'physical_function')
 4492        if obj.qos is not None:
 4493            QosWriter.write_one(obj.qos, writer, 'qos')
 4494        if obj.statistics is not None:
 4495            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
 4496        writer.write_end()
 4497
 4498    @staticmethod
 4499    def write_many(objs, writer, singular=None, plural=None):
 4500        if singular is None:
 4501            singular = 'host_nic'
 4502        if plural is None:
 4503            plural = 'host_nics'
 4504        writer.write_start(plural)
 4505        if type(objs) == List:
 4506            href = objs.href
 4507            if href is not None:
 4508                writer.write_attribute('href', href)
 4509        for obj in objs:
 4510            HostNicWriter.write_one(obj, writer, singular)
 4511        writer.write_end()
 4512
 4513
 4514class HostNicVirtualFunctionsConfigurationWriter(Writer):
 4515
 4516    def __init__(self):
 4517        super(HostNicVirtualFunctionsConfigurationWriter, self).__init__()
 4518
 4519    @staticmethod
 4520    def write_one(obj, writer, singular=None):
 4521        if singular is None:
 4522            singular = 'host_nic_virtual_functions_configuration'
 4523        writer.write_start(singular)
 4524        href = obj.href
 4525        if href is not None:
 4526            writer.write_attribute('href', href)
 4527        if obj.all_networks_allowed is not None:
 4528            Writer.write_boolean(writer, 'all_networks_allowed', obj.all_networks_allowed)
 4529        if obj.max_number_of_virtual_functions is not None:
 4530            Writer.write_integer(writer, 'max_number_of_virtual_functions', obj.max_number_of_virtual_functions)
 4531        if obj.number_of_virtual_functions is not None:
 4532            Writer.write_integer(writer, 'number_of_virtual_functions', obj.number_of_virtual_functions)
 4533        writer.write_end()
 4534
 4535    @staticmethod
 4536    def write_many(objs, writer, singular=None, plural=None):
 4537        if singular is None:
 4538            singular = 'host_nic_virtual_functions_configuration'
 4539        if plural is None:
 4540            plural = 'host_nic_virtual_functions_configurations'
 4541        writer.write_start(plural)
 4542        if type(objs) == List:
 4543            href = objs.href
 4544            if href is not None:
 4545                writer.write_attribute('href', href)
 4546        for obj in objs:
 4547            HostNicVirtualFunctionsConfigurationWriter.write_one(obj, writer, singular)
 4548        writer.write_end()
 4549
 4550
 4551class HostStorageWriter(Writer):
 4552
 4553    def __init__(self):
 4554        super(HostStorageWriter, self).__init__()
 4555
 4556    @staticmethod
 4557    def write_one(obj, writer, singular=None):
 4558        if singular is None:
 4559            singular = 'host_storage'
 4560        writer.write_start(singular)
 4561        href = obj.href
 4562        if href is not None:
 4563            writer.write_attribute('href', href)
 4564        if obj.id is not None:
 4565            writer.write_attribute('id', obj.id)
 4566        if obj.address is not None:
 4567            Writer.write_string(writer, 'address', obj.address)
 4568        if obj.comment is not None:
 4569            Writer.write_string(writer, 'comment', obj.comment)
 4570        if obj.description is not None:
 4571            Writer.write_string(writer, 'description', obj.description)
 4572        if obj.driver_options is not None:
 4573            PropertyWriter.write_many(obj.driver_options, writer, 'property', 'driver_options')
 4574        if obj.driver_sensitive_options is not None:
 4575            PropertyWriter.write_many(obj.driver_sensitive_options, writer, 'property', 'driver_sensitive_options')
 4576        if obj.logical_units is not None:
 4577            LogicalUnitWriter.write_many(obj.logical_units, writer, 'logical_unit', 'logical_units')
 4578        if obj.mount_options is not None:
 4579            Writer.write_string(writer, 'mount_options', obj.mount_options)
 4580        if obj.name is not None:
 4581            Writer.write_string(writer, 'name', obj.name)
 4582        if obj.nfs_retrans is not None:
 4583            Writer.write_integer(writer, 'nfs_retrans', obj.nfs_retrans)
 4584        if obj.nfs_timeo is not None:
 4585            Writer.write_integer(writer, 'nfs_timeo', obj.nfs_timeo)
 4586        if obj.nfs_version is not None:
 4587            Writer.write_string(writer, 'nfs_version', obj.nfs_version.value)
 4588        if obj.override_luns is not None:
 4589            Writer.write_boolean(writer, 'override_luns', obj.override_luns)
 4590        if obj.password is not None:
 4591            Writer.write_string(writer, 'password', obj.password)
 4592        if obj.path is not None:
 4593            Writer.write_string(writer, 'path', obj.path)
 4594        if obj.port is not None:
 4595            Writer.write_integer(writer, 'port', obj.port)
 4596        if obj.portal is not None:
 4597            Writer.write_string(writer, 'portal', obj.portal)
 4598        if obj.target is not None:
 4599            Writer.write_string(writer, 'target', obj.target)
 4600        if obj.type is not None:
 4601            Writer.write_string(writer, 'type', obj.type.value)
 4602        if obj.username is not None:
 4603            Writer.write_string(writer, 'username', obj.username)
 4604        if obj.vfs_type is not None:
 4605            Writer.write_string(writer, 'vfs_type', obj.vfs_type)
 4606        if obj.volume_group is not None:
 4607            VolumeGroupWriter.write_one(obj.volume_group, writer, 'volume_group')
 4608        if obj.host is not None:
 4609            HostWriter.write_one(obj.host, writer, 'host')
 4610        writer.write_end()
 4611
 4612    @staticmethod
 4613    def write_many(objs, writer, singular=None, plural=None):
 4614        if singular is None:
 4615            singular = 'host_storage'
 4616        if plural is None:
 4617            plural = 'host_storages'
 4618        writer.write_start(plural)
 4619        if type(objs) == List:
 4620            href = objs.href
 4621            if href is not None:
 4622                writer.write_attribute('href', href)
 4623        for obj in objs:
 4624            HostStorageWriter.write_one(obj, writer, singular)
 4625        writer.write_end()
 4626
 4627
 4628class HostedEngineWriter(Writer):
 4629
 4630    def __init__(self):
 4631        super(HostedEngineWriter, self).__init__()
 4632
 4633    @staticmethod
 4634    def write_one(obj, writer, singular=None):
 4635        if singular is None:
 4636            singular = 'hosted_engine'
 4637        writer.write_start(singular)
 4638        href = obj.href
 4639        if href is not None:
 4640            writer.write_attribute('href', href)
 4641        if obj.active is not None:
 4642            Writer.write_boolean(writer, 'active', obj.active)
 4643        if obj.configured is not None:
 4644            Writer.write_boolean(writer, 'configured', obj.configured)
 4645        if obj.global_maintenance is not None:
 4646            Writer.write_boolean(writer, 'global_maintenance', obj.global_maintenance)
 4647        if obj.local_maintenance is not None:
 4648            Writer.write_boolean(writer, 'local_maintenance', obj.local_maintenance)
 4649        if obj.score is not None:
 4650            Writer.write_integer(writer, 'score', obj.score)
 4651        writer.write_end()
 4652
 4653    @staticmethod
 4654    def write_many(objs, writer, singular=None, plural=None):
 4655        if singular is None:
 4656            singular = 'hosted_engine'
 4657        if plural is None:
 4658            plural = 'hosted_engines'
 4659        writer.write_start(plural)
 4660        if type(objs) == List:
 4661            href = objs.href
 4662            if href is not None:
 4663                writer.write_attribute('href', href)
 4664        for obj in objs:
 4665            HostedEngineWriter.write_one(obj, writer, singular)
 4666        writer.write_end()
 4667
 4668
 4669class IconWriter(Writer):
 4670
 4671    def __init__(self):
 4672        super(IconWriter, self).__init__()
 4673
 4674    @staticmethod
 4675    def write_one(obj, writer, singular=None):
 4676        if singular is None:
 4677            singular = 'icon'
 4678        writer.write_start(singular)
 4679        href = obj.href
 4680        if href is not None:
 4681            writer.write_attribute('href', href)
 4682        if obj.id is not None:
 4683            writer.write_attribute('id', obj.id)
 4684        if obj.comment is not None:
 4685            Writer.write_string(writer, 'comment', obj.comment)
 4686        if obj.data is not None:
 4687            Writer.write_string(writer, 'data', obj.data)
 4688        if obj.description is not None:
 4689            Writer.write_string(writer, 'description', obj.description)
 4690        if obj.media_type is not None:
 4691            Writer.write_string(writer, 'media_type', obj.media_type)
 4692        if obj.name is not None:
 4693            Writer.write_string(writer, 'name', obj.name)
 4694        writer.write_end()
 4695
 4696    @staticmethod
 4697    def write_many(objs, writer, singular=None, plural=None):
 4698        if singular is None:
 4699            singular = 'icon'
 4700        if plural is None:
 4701            plural = 'icons'
 4702        writer.write_start(plural)
 4703        if type(objs) == List:
 4704            href = objs.href
 4705            if href is not None:
 4706                writer.write_attribute('href', href)
 4707        for obj in objs:
 4708            IconWriter.write_one(obj, writer, singular)
 4709        writer.write_end()
 4710
 4711
 4712class IdentifiedWriter(Writer):
 4713
 4714    def __init__(self):
 4715        super(IdentifiedWriter, self).__init__()
 4716
 4717    @staticmethod
 4718    def write_one(obj, writer, singular=None):
 4719        if singular is None:
 4720            singular = 'identified'
 4721        writer.write_start(singular)
 4722        href = obj.href
 4723        if href is not None:
 4724            writer.write_attribute('href', href)
 4725        if obj.id is not None:
 4726            writer.write_attribute('id', obj.id)
 4727        if obj.comment is not None:
 4728            Writer.write_string(writer, 'comment', obj.comment)
 4729        if obj.description is not None:
 4730            Writer.write_string(writer, 'description', obj.description)
 4731        if obj.name is not None:
 4732            Writer.write_string(writer, 'name', obj.name)
 4733        writer.write_end()
 4734
 4735    @staticmethod
 4736    def write_many(objs, writer, singular=None, plural=None):
 4737        if singular is None:
 4738            singular = 'identified'
 4739        if plural is None:
 4740            plural = 'identifieds'
 4741        writer.write_start(plural)
 4742        if type(objs) == List:
 4743            href = objs.href
 4744            if href is not None:
 4745                writer.write_attribute('href', href)
 4746        for obj in objs:
 4747            IdentifiedWriter.write_one(obj, writer, singular)
 4748        writer.write_end()
 4749
 4750
 4751class ImageWriter(Writer):
 4752
 4753    def __init__(self):
 4754        super(ImageWriter, self).__init__()
 4755
 4756    @staticmethod
 4757    def write_one(obj, writer, singular=None):
 4758        if singular is None:
 4759            singular = 'image'
 4760        writer.write_start(singular)
 4761        href = obj.href
 4762        if href is not None:
 4763            writer.write_attribute('href', href)
 4764        if obj.id is not None:
 4765            writer.write_attribute('id', obj.id)
 4766        if obj.comment is not None:
 4767            Writer.write_string(writer, 'comment', obj.comment)
 4768        if obj.description is not None:
 4769            Writer.write_string(writer, 'description', obj.description)
 4770        if obj.name is not None:
 4771            Writer.write_string(writer, 'name', obj.name)
 4772        if obj.size is not None:
 4773            Writer.write_integer(writer, 'size', obj.size)
 4774        if obj.type is not None:
 4775            Writer.write_string(writer, 'type', obj.type.value)
 4776        if obj.storage_domain is not None:
 4777            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
 4778        writer.write_end()
 4779
 4780    @staticmethod
 4781    def write_many(objs, writer, singular=None, plural=None):
 4782        if singular is None:
 4783            singular = 'image'
 4784        if plural is None:
 4785            plural = 'images'
 4786        writer.write_start(plural)
 4787        if type(objs) == List:
 4788            href = objs.href
 4789            if href is not None:
 4790                writer.write_attribute('href', href)
 4791        for obj in objs:
 4792            ImageWriter.write_one(obj, writer, singular)
 4793        writer.write_end()
 4794
 4795
 4796class ImageTransferWriter(Writer):
 4797
 4798    def __init__(self):
 4799        super(ImageTransferWriter, self).__init__()
 4800
 4801    @staticmethod
 4802    def write_one(obj, writer, singular=None):
 4803        if singular is None:
 4804            singular = 'image_transfer'
 4805        writer.write_start(singular)
 4806        href = obj.href
 4807        if href is not None:
 4808            writer.write_attribute('href', href)
 4809        if obj.id is not None:
 4810            writer.write_attribute('id', obj.id)
 4811        if obj.active is not None:
 4812            Writer.write_boolean(writer, 'active', obj.active)
 4813        if obj.comment is not None:
 4814            Writer.write_string(writer, 'comment', obj.comment)
 4815        if obj.description is not None:
 4816            Writer.write_string(writer, 'description', obj.description)
 4817        if obj.direction is not None:
 4818            Writer.write_string(writer, 'direction', obj.direction.value)
 4819        if obj.format is not None:
 4820            Writer.write_string(writer, 'format', obj.format.value)
 4821        if obj.inactivity_timeout is not None:
 4822            Writer.write_integer(writer, 'inactivity_timeout', obj.inactivity_timeout)
 4823        if obj.name is not None:
 4824            Writer.write_string(writer, 'name', obj.name)
 4825        if obj.phase is not None:
 4826            Writer.write_string(writer, 'phase', obj.phase.value)
 4827        if obj.proxy_url is not None:
 4828            Writer.write_string(writer, 'proxy_url', obj.proxy_url)
 4829        if obj.shallow is not None:
 4830            Writer.write_boolean(writer, 'shallow', obj.shallow)
 4831        if obj.timeout_policy is not None:
 4832            Writer.write_string(writer, 'timeout_policy', obj.timeout_policy.value)
 4833        if obj.transfer_url is not None:
 4834            Writer.write_string(writer, 'transfer_url', obj.transfer_url)
 4835        if obj.transferred is not None:
 4836            Writer.write_integer(writer, 'transferred', obj.transferred)
 4837        if obj.backup is not None:
 4838            BackupWriter.write_one(obj.backup, writer, 'backup')
 4839        if obj.disk is not None:
 4840            DiskWriter.write_one(obj.disk, writer, 'disk')
 4841        if obj.host is not None:
 4842            HostWriter.write_one(obj.host, writer, 'host')
 4843        if obj.image is not None:
 4844            ImageWriter.write_one(obj.image, writer, 'image')
 4845        if obj.snapshot is not None:
 4846            DiskSnapshotWriter.write_one(obj.snapshot, writer, 'snapshot')
 4847        writer.write_end()
 4848
 4849    @staticmethod
 4850    def write_many(objs, writer, singular=None, plural=None):
 4851        if singular is None:
 4852            singular = 'image_transfer'
 4853        if plural is None:
 4854            plural = 'image_transfers'
 4855        writer.write_start(plural)
 4856        if type(objs) == List:
 4857            href = objs.href
 4858            if href is not None:
 4859                writer.write_attribute('href', href)
 4860        for obj in objs:
 4861            ImageTransferWriter.write_one(obj, writer, singular)
 4862        writer.write_end()
 4863
 4864
 4865class InitializationWriter(Writer):
 4866
 4867    def __init__(self):
 4868        super(InitializationWriter, self).__init__()
 4869
 4870    @staticmethod
 4871    def write_one(obj, writer, singular=None):
 4872        if singular is None:
 4873            singular = 'initialization'
 4874        writer.write_start(singular)
 4875        href = obj.href
 4876        if href is not None:
 4877            writer.write_attribute('href', href)
 4878        if obj.active_directory_ou is not None:
 4879            Writer.write_string(writer, 'active_directory_ou', obj.active_directory_ou)
 4880        if obj.authorized_ssh_keys is not None:
 4881            Writer.write_string(writer, 'authorized_ssh_keys', obj.authorized_ssh_keys)
 4882        if obj.cloud_init is not None:
 4883            CloudInitWriter.write_one(obj.cloud_init, writer, 'cloud_init')
 4884        if obj.cloud_init_network_protocol is not None:
 4885            Writer.write_string(writer, 'cloud_init_network_protocol', obj.cloud_init_network_protocol.value)
 4886        if obj.configuration is not None:
 4887            ConfigurationWriter.write_one(obj.configuration, writer, 'configuration')
 4888        if obj.custom_script is not None:
 4889            Writer.write_string(writer, 'custom_script', obj.custom_script)
 4890        if obj.dns_search is not None:
 4891            Writer.write_string(writer, 'dns_search', obj.dns_search)
 4892        if obj.dns_servers is not None:
 4893            Writer.write_string(writer, 'dns_servers', obj.dns_servers)
 4894        if obj.domain is not None:
 4895            Writer.write_string(writer, 'domain', obj.domain)
 4896        if obj.host_name is not None:
 4897            Writer.write_string(writer, 'host_name', obj.host_name)
 4898        if obj.input_locale is not None:
 4899            Writer.write_string(writer, 'input_locale', obj.input_locale)
 4900        if obj.nic_configurations is not None:
 4901            NicConfigurationWriter.write_many(obj.nic_configurations, writer, 'nic_configuration', 'nic_configurations')
 4902        if obj.org_name is not None:
 4903            Writer.write_string(writer, 'org_name', obj.org_name)
 4904        if obj.regenerate_ids is not None:
 4905            Writer.write_boolean(writer, 'regenerate_ids', obj.regenerate_ids)
 4906        if obj.regenerate_ssh_keys is not None:
 4907            Writer.write_boolean(writer, 'regenerate_ssh_keys', obj.regenerate_ssh_keys)
 4908        if obj.root_password is not None:
 4909            Writer.write_string(writer, 'root_password', obj.root_password)
 4910        if obj.system_locale is not None:
 4911            Writer.write_string(writer, 'system_locale', obj.system_locale)
 4912        if obj.timezone is not None:
 4913            Writer.write_string(writer, 'timezone', obj.timezone)
 4914        if obj.ui_language is not None:
 4915            Writer.write_string(writer, 'ui_language', obj.ui_language)
 4916        if obj.user_locale is not None:
 4917            Writer.write_string(writer, 'user_locale', obj.user_locale)
 4918        if obj.user_name is not None:
 4919            Writer.write_string(writer, 'user_name', obj.user_name)
 4920        if obj.windows_license_key is not None:
 4921            Writer.write_string(writer, 'windows_license_key', obj.windows_license_key)
 4922        writer.write_end()
 4923
 4924    @staticmethod
 4925    def write_many(objs, writer, singular=None, plural=None):
 4926        if singular is None:
 4927            singular = 'initialization'
 4928        if plural is None:
 4929            plural = 'initializations'
 4930        writer.write_start(plural)
 4931        if type(objs) == List:
 4932            href = objs.href
 4933            if href is not None:
 4934                writer.write_attribute('href', href)
 4935        for obj in objs:
 4936            InitializationWriter.write_one(obj, writer, singular)
 4937        writer.write_end()
 4938
 4939
 4940class InstanceTypeWriter(Writer):
 4941
 4942    def __init__(self):
 4943        super(InstanceTypeWriter, self).__init__()
 4944
 4945    @staticmethod
 4946    def write_one(obj, writer, singular=None):
 4947        if singular is None:
 4948            singular = 'instance_type'
 4949        writer.write_start(singular)
 4950        href = obj.href
 4951        if href is not None:
 4952            writer.write_attribute('href', href)
 4953        if obj.id is not None:
 4954            writer.write_attribute('id', obj.id)
 4955        if obj.auto_pinning_policy is not None:
 4956            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
 4957        if obj.bios is not None:
 4958            BiosWriter.write_one(obj.bios, writer, 'bios')
 4959        if obj.comment is not None:
 4960            Writer.write_string(writer, 'comment', obj.comment)
 4961        if obj.console is not None:
 4962            ConsoleWriter.write_one(obj.console, writer, 'console')
 4963        if obj.cpu is not None:
 4964            CpuWriter.write_one(obj.cpu, writer, 'cpu')
 4965        if obj.cpu_pinning_policy is not None:
 4966            Writer.write_string(writer, 'cpu_pinning_policy', obj.cpu_pinning_policy.value)
 4967        if obj.cpu_shares is not None:
 4968            Writer.write_integer(writer, 'cpu_shares', obj.cpu_shares)
 4969        if obj.creation_time is not None:
 4970            Writer.write_date(writer, 'creation_time', obj.creation_time)
 4971        if obj.custom_compatibility_version is not None:
 4972            VersionWriter.write_one(obj.custom_compatibility_version, writer, 'custom_compatibility_version')
 4973        if obj.custom_cpu_model is not None:
 4974            Writer.write_string(writer, 'custom_cpu_model', obj.custom_cpu_model)
 4975        if obj.custom_emulated_machine is not None:
 4976            Writer.write_string(writer, 'custom_emulated_machine', obj.custom_emulated_machine)
 4977        if obj.custom_properties is not None:
 4978            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
 4979        if obj.delete_protected is not None:
 4980            Writer.write_boolean(writer, 'delete_protected', obj.delete_protected)
 4981        if obj.description is not None:
 4982            Writer.write_string(writer, 'description', obj.description)
 4983        if obj.display is not None:
 4984            DisplayWriter.write_one(obj.display, writer, 'display')
 4985        if obj.domain is not None:
 4986            DomainWriter.write_one(obj.domain, writer, 'domain')
 4987        if obj.high_availability is not None:
 4988            HighAvailabilityWriter.write_one(obj.high_availability, writer, 'high_availability')
 4989        if obj.initialization is not None:
 4990            InitializationWriter.write_one(obj.initialization, writer, 'initialization')
 4991        if obj.io is not None:
 4992            IoWriter.write_one(obj.io, writer, 'io')
 4993        if obj.large_icon is not None:
 4994            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
 4995        if obj.lease is not None:
 4996            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
 4997        if obj.memory is not None:
 4998            Writer.write_integer(writer, 'memory', obj.memory)
 4999        if obj.memory_policy is not None:
 5000            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
 5001        if obj.migration is not None:
 5002            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
 5003        if obj.migration_downtime is not None:
 5004            Writer.write_integer(writer, 'migration_downtime', obj.migration_downtime)
 5005        if obj.multi_queues_enabled is not None:
 5006            Writer.write_boolean(writer, 'multi_queues_enabled', obj.multi_queues_enabled)
 5007        if obj.name is not None:
 5008            Writer.write_string(writer, 'name', obj.name)
 5009        if obj.origin is not None:
 5010            Writer.write_string(writer, 'origin', obj.origin)
 5011        if obj.os is not None:
 5012            OperatingSystemWriter.write_one(obj.os, writer, 'os')
 5013        if obj.placement_policy is not None:
 5014            VmPlacementPolicyWriter.write_one(obj.placement_policy, writer, 'placement_policy')
 5015        if obj.rng_device is not None:
 5016            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
 5017        if obj.serial_number is not None:
 5018            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
 5019        if obj.small_icon is not None:
 5020            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
 5021        if obj.soundcard_enabled is not None:
 5022            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
 5023        if obj.sso is not None:
 5024            SsoWriter.write_one(obj.sso, writer, 'sso')
 5025        if obj.start_paused is not None:
 5026            Writer.write_boolean(writer, 'start_paused', obj.start_paused)
 5027        if obj.stateless is not None:
 5028            Writer.write_boolean(writer, 'stateless', obj.stateless)
 5029        if obj.status is not None:
 5030            Writer.write_string(writer, 'status', obj.status.value)
 5031        if obj.storage_error_resume_behaviour is not None:
 5032            Writer.write_string(writer, 'storage_error_resume_behaviour', obj.storage_error_resume_behaviour.value)
 5033        if obj.time_zone is not None:
 5034            TimeZoneWriter.write_one(obj.time_zone, writer, 'time_zone')
 5035        if obj.tpm_enabled is not None:
 5036            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
 5037        if obj.tunnel_migration is not None:
 5038            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
 5039        if obj.type is not None:
 5040            Writer.write_string(writer, 'type', obj.type.value)
 5041        if obj.usb is not None:
 5042            UsbWriter.write_one(obj.usb, writer, 'usb')
 5043        if obj.version is not None:
 5044            TemplateVersionWriter.write_one(obj.version, writer, 'version')
 5045        if obj.virtio_scsi is not None:
 5046            VirtioScsiWriter.write_one(obj.virtio_scsi, writer, 'virtio_scsi')
 5047        if obj.virtio_scsi_multi_queues is not None:
 5048            Writer.write_integer(writer, 'virtio_scsi_multi_queues', obj.virtio_scsi_multi_queues)
 5049        if obj.virtio_scsi_multi_queues_enabled is not None:
 5050            Writer.write_boolean(writer, 'virtio_scsi_multi_queues_enabled', obj.virtio_scsi_multi_queues_enabled)
 5051        if obj.vm is not None:
 5052            VmWriter.write_one(obj.vm, writer, 'vm')
 5053        if obj.cdroms is not None:
 5054            CdromWriter.write_many(obj.cdroms, writer, 'cdrom', 'cdroms')
 5055        if obj.cluster is not None:
 5056            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
 5057        if obj.cpu_profile is not None:
 5058            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
 5059        if obj.disk_attachments is not None:
 5060            DiskAttachmentWriter.write_many(obj.disk_attachments, writer, 'disk_attachment', 'disk_attachments')
 5061        if obj.graphics_consoles is not None:
 5062            GraphicsConsoleWriter.write_many(obj.graphics_consoles, writer, 'graphics_console', 'graphics_consoles')
 5063        if obj.mediated_devices is not None:
 5064            VmMediatedDeviceWriter.write_many(obj.mediated_devices, writer, 'vm_mediated_device', 'mediated_devices')
 5065        if obj.nics is not None:
 5066            NicWriter.write_many(obj.nics, writer, 'nic', 'nics')
 5067        if obj.permissions is not None:
 5068            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 5069        if obj.quota is not None:
 5070            QuotaWriter.write_one(obj.quota, writer, 'quota')
 5071        if obj.storage_domain is not None:
 5072            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
 5073        if obj.tags is not None:
 5074            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
 5075        if obj.watchdogs is not None:
 5076            WatchdogWriter.write_many(obj.watchdogs, writer, 'watchdog', 'watchdogs')
 5077        writer.write_end()
 5078
 5079    @staticmethod
 5080    def write_many(objs, writer, singular=None, plural=None):
 5081        if singular is None:
 5082            singular = 'instance_type'
 5083        if plural is None:
 5084            plural = 'instance_types'
 5085        writer.write_start(plural)
 5086        if type(objs) == List:
 5087            href = objs.href
 5088            if href is not None:
 5089                writer.write_attribute('href', href)
 5090        for obj in objs:
 5091            InstanceTypeWriter.write_one(obj, writer, singular)
 5092        writer.write_end()
 5093
 5094
 5095class IoWriter(Writer):
 5096
 5097    def __init__(self):
 5098        super(IoWriter, self).__init__()
 5099
 5100    @staticmethod
 5101    def write_one(obj, writer, singular=None):
 5102        if singular is None:
 5103            singular = 'io'
 5104        writer.write_start(singular)
 5105        href = obj.href
 5106        if href is not None:
 5107            writer.write_attribute('href', href)
 5108        if obj.threads is not None:
 5109            Writer.write_integer(writer, 'threads', obj.threads)
 5110        writer.write_end()
 5111
 5112    @staticmethod
 5113    def write_many(objs, writer, singular=None, plural=None):
 5114        if singular is None:
 5115            singular = 'io'
 5116        if plural is None:
 5117            plural = 'ios'
 5118        writer.write_start(plural)
 5119        if type(objs) == List:
 5120            href = objs.href
 5121            if href is not None:
 5122                writer.write_attribute('href', href)
 5123        for obj in objs:
 5124            IoWriter.write_one(obj, writer, singular)
 5125        writer.write_end()
 5126
 5127
 5128class IpWriter(Writer):
 5129
 5130    def __init__(self):
 5131        super(IpWriter, self).__init__()
 5132
 5133    @staticmethod
 5134    def write_one(obj, writer, singular=None):
 5135        if singular is None:
 5136            singular = 'ip'
 5137        writer.write_start(singular)
 5138        href = obj.href
 5139        if href is not None:
 5140            writer.write_attribute('href', href)
 5141        if obj.address is not None:
 5142            Writer.write_string(writer, 'address', obj.address)
 5143        if obj.gateway is not None:
 5144            Writer.write_string(writer, 'gateway', obj.gateway)
 5145        if obj.netmask is not None:
 5146            Writer.write_string(writer, 'netmask', obj.netmask)
 5147        if obj.version is not None:
 5148            Writer.write_string(writer, 'version', obj.version.value)
 5149        writer.write_end()
 5150
 5151    @staticmethod
 5152    def write_many(objs, writer, singular=None, plural=None):
 5153        if singular is None:
 5154            singular = 'ip'
 5155        if plural is None:
 5156            plural = 'ips'
 5157        writer.write_start(plural)
 5158        if type(objs) == List:
 5159            href = objs.href
 5160            if href is not None:
 5161                writer.write_attribute('href', href)
 5162        for obj in objs:
 5163            IpWriter.write_one(obj, writer, singular)
 5164        writer.write_end()
 5165
 5166
 5167class IpAddressAssignmentWriter(Writer):
 5168
 5169    def __init__(self):
 5170        super(IpAddressAssignmentWriter, self).__init__()
 5171
 5172    @staticmethod
 5173    def write_one(obj, writer, singular=None):
 5174        if singular is None:
 5175            singular = 'ip_address_assignment'
 5176        writer.write_start(singular)
 5177        href = obj.href
 5178        if href is not None:
 5179            writer.write_attribute('href', href)
 5180        if obj.assignment_method is not None:
 5181            Writer.write_string(writer, 'assignment_method', obj.assignment_method.value)
 5182        if obj.ip is not None:
 5183            IpWriter.write_one(obj.ip, writer, 'ip')
 5184        writer.write_end()
 5185
 5186    @staticmethod
 5187    def write_many(objs, writer, singular=None, plural=None):
 5188        if singular is None:
 5189            singular = 'ip_address_assignment'
 5190        if plural is None:
 5191            plural = 'ip_address_assignments'
 5192        writer.write_start(plural)
 5193        if type(objs) == List:
 5194            href = objs.href
 5195            if href is not None:
 5196                writer.write_attribute('href', href)
 5197        for obj in objs:
 5198            IpAddressAssignmentWriter.write_one(obj, writer, singular)
 5199        writer.write_end()
 5200
 5201
 5202class IscsiBondWriter(Writer):
 5203
 5204    def __init__(self):
 5205        super(IscsiBondWriter, self).__init__()
 5206
 5207    @staticmethod
 5208    def write_one(obj, writer, singular=None):
 5209        if singular is None:
 5210            singular = 'iscsi_bond'
 5211        writer.write_start(singular)
 5212        href = obj.href
 5213        if href is not None:
 5214            writer.write_attribute('href', href)
 5215        if obj.id is not None:
 5216            writer.write_attribute('id', obj.id)
 5217        if obj.comment is not None:
 5218            Writer.write_string(writer, 'comment', obj.comment)
 5219        if obj.description is not None:
 5220            Writer.write_string(writer, 'description', obj.description)
 5221        if obj.name is not None:
 5222            Writer.write_string(writer, 'name', obj.name)
 5223        if obj.data_center is not None:
 5224            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
 5225        if obj.networks is not None:
 5226            NetworkWriter.write_many(obj.networks, writer, 'network', 'networks')
 5227        if obj.storage_connections is not None:
 5228            StorageConnectionWriter.write_many(obj.storage_connections, writer, 'storage_connection', 'storage_connections')
 5229        writer.write_end()
 5230
 5231    @staticmethod
 5232    def write_many(objs, writer, singular=None, plural=None):
 5233        if singular is None:
 5234            singular = 'iscsi_bond'
 5235        if plural is None:
 5236            plural = 'iscsi_bonds'
 5237        writer.write_start(plural)
 5238        if type(objs) == List:
 5239            href = objs.href
 5240            if href is not None:
 5241                writer.write_attribute('href', href)
 5242        for obj in objs:
 5243            IscsiBondWriter.write_one(obj, writer, singular)
 5244        writer.write_end()
 5245
 5246
 5247class IscsiDetailsWriter(Writer):
 5248
 5249    def __init__(self):
 5250        super(IscsiDetailsWriter, self).__init__()
 5251
 5252    @staticmethod
 5253    def write_one(obj, writer, singular=None):
 5254        if singular is None:
 5255            singular = 'iscsi_details'
 5256        writer.write_start(singular)
 5257        href = obj.href
 5258        if href is not None:
 5259            writer.write_attribute('href', href)
 5260        if obj.address is not None:
 5261            Writer.write_string(writer, 'address', obj.address)
 5262        if obj.disk_id is not None:
 5263            Writer.write_string(writer, 'disk_id', obj.disk_id)
 5264        if obj.initiator is not None:
 5265            Writer.write_string(writer, 'initiator', obj.initiator)
 5266        if obj.lun_mapping is not None:
 5267            Writer.write_integer(writer, 'lun_mapping', obj.lun_mapping)
 5268        if obj.password is not None:
 5269            Writer.write_string(writer, 'password', obj.password)
 5270        if obj.paths is not None:
 5271            Writer.write_integer(writer, 'paths', obj.paths)
 5272        if obj.port is not None:
 5273            Writer.write_integer(writer, 'port', obj.port)
 5274        if obj.portal is not None:
 5275            Writer.write_string(writer, 'portal', obj.portal)
 5276        if obj.product_id is not None:
 5277            Writer.write_string(writer, 'product_id', obj.product_id)
 5278        if obj.serial is not None:
 5279            Writer.write_string(writer, 'serial', obj.serial)
 5280        if obj.size is not None:
 5281            Writer.write_integer(writer, 'size', obj.size)
 5282        if obj.status is not None:
 5283            Writer.write_string(writer, 'status', obj.status)
 5284        if obj.storage_domain_id is not None:
 5285            Writer.write_string(writer, 'storage_domain_id', obj.storage_domain_id)
 5286        if obj.target is not None:
 5287            Writer.write_string(writer, 'target', obj.target)
 5288        if obj.username is not None:
 5289            Writer.write_string(writer, 'username', obj.username)
 5290        if obj.vendor_id is not None:
 5291            Writer.write_string(writer, 'vendor_id', obj.vendor_id)
 5292        if obj.volume_group_id is not None:
 5293            Writer.write_string(writer, 'volume_group_id', obj.volume_group_id)
 5294        writer.write_end()
 5295
 5296    @staticmethod
 5297    def write_many(objs, writer, singular=None, plural=None):
 5298        if singular is None:
 5299            singular = 'iscsi_details'
 5300        if plural is None:
 5301            plural = 'iscsi_detailss'
 5302        writer.write_start(plural)
 5303        if type(objs) == List:
 5304            href = objs.href
 5305            if href is not None:
 5306                writer.write_attribute('href', href)
 5307        for obj in objs:
 5308            IscsiDetailsWriter.write_one(obj, writer, singular)
 5309        writer.write_end()
 5310
 5311
 5312class JobWriter(Writer):
 5313
 5314    def __init__(self):
 5315        super(JobWriter, self).__init__()
 5316
 5317    @staticmethod
 5318    def write_one(obj, writer, singular=None):
 5319        if singular is None:
 5320            singular = 'job'
 5321        writer.write_start(singular)
 5322        href = obj.href
 5323        if href is not None:
 5324            writer.write_attribute('href', href)
 5325        if obj.id is not None:
 5326            writer.write_attribute('id', obj.id)
 5327        if obj.auto_cleared is not None:
 5328            Writer.write_boolean(writer, 'auto_cleared', obj.auto_cleared)
 5329        if obj.comment is not None:
 5330            Writer.write_string(writer, 'comment', obj.comment)
 5331        if obj.description is not None:
 5332            Writer.write_string(writer, 'description', obj.description)
 5333        if obj.end_time is not None:
 5334            Writer.write_date(writer, 'end_time', obj.end_time)
 5335        if obj.external is not None:
 5336            Writer.write_boolean(writer, 'external', obj.external)
 5337        if obj.last_updated is not None:
 5338            Writer.write_date(writer, 'last_updated', obj.last_updated)
 5339        if obj.name is not None:
 5340            Writer.write_string(writer, 'name', obj.name)
 5341        if obj.start_time is not None:
 5342            Writer.write_date(writer, 'start_time', obj.start_time)
 5343        if obj.status is not None:
 5344            Writer.write_string(writer, 'status', obj.status.value)
 5345        if obj.owner is not None:
 5346            UserWriter.write_one(obj.owner, writer, 'owner')
 5347        if obj.steps is not None:
 5348            StepWriter.write_many(obj.steps, writer, 'step', 'steps')
 5349        writer.write_end()
 5350
 5351    @staticmethod
 5352    def write_many(objs, writer, singular=None, plural=None):
 5353        if singular is None:
 5354            singular = 'job'
 5355        if plural is None:
 5356            plural = 'jobs'
 5357        writer.write_start(plural)
 5358        if type(objs) == List:
 5359            href = objs.href
 5360            if href is not None:
 5361                writer.write_attribute('href', href)
 5362        for obj in objs:
 5363            JobWriter.write_one(obj, writer, singular)
 5364        writer.write_end()
 5365
 5366
 5367class KatelloErratumWriter(Writer):
 5368
 5369    def __init__(self):
 5370        super(KatelloErratumWriter, self).__init__()
 5371
 5372    @staticmethod
 5373    def write_one(obj, writer, singular=None):
 5374        if singular is None:
 5375            singular = 'katello_erratum'
 5376        writer.write_start(singular)
 5377        href = obj.href
 5378        if href is not None:
 5379            writer.write_attribute('href', href)
 5380        if obj.id is not None:
 5381            writer.write_attribute('id', obj.id)
 5382        if obj.comment is not None:
 5383            Writer.write_string(writer, 'comment', obj.comment)
 5384        if obj.description is not None:
 5385            Writer.write_string(writer, 'description', obj.description)
 5386        if obj.issued is not None:
 5387            Writer.write_date(writer, 'issued', obj.issued)
 5388        if obj.name is not None:
 5389            Writer.write_string(writer, 'name', obj.name)
 5390        if obj.packages is not None:
 5391            PackageWriter.write_many(obj.packages, writer, 'package', 'packages')
 5392        if obj.severity is not None:
 5393            Writer.write_string(writer, 'severity', obj.severity)
 5394        if obj.solution is not None:
 5395            Writer.write_string(writer, 'solution', obj.solution)
 5396        if obj.summary is not None:
 5397            Writer.write_string(writer, 'summary', obj.summary)
 5398        if obj.title is not None:
 5399            Writer.write_string(writer, 'title', obj.title)
 5400        if obj.type is not None:
 5401            Writer.write_string(writer, 'type', obj.type)
 5402        if obj.host is not None:
 5403            HostWriter.write_one(obj.host, writer, 'host')
 5404        if obj.vm is not None:
 5405            VmWriter.write_one(obj.vm, writer, 'vm')
 5406        writer.write_end()
 5407
 5408    @staticmethod
 5409    def write_many(objs, writer, singular=None, plural=None):
 5410        if singular is None:
 5411            singular = 'katello_erratum'
 5412        if plural is None:
 5413            plural = 'katello_errata'
 5414        writer.write_start(plural)
 5415        if type(objs) == List:
 5416            href = objs.href
 5417            if href is not None:
 5418                writer.write_attribute('href', href)
 5419        for obj in objs:
 5420            KatelloErratumWriter.write_one(obj, writer, singular)
 5421        writer.write_end()
 5422
 5423
 5424class KernelWriter(Writer):
 5425
 5426    def __init__(self):
 5427        super(KernelWriter, self).__init__()
 5428
 5429    @staticmethod
 5430    def write_one(obj, writer, singular=None):
 5431        if singular is None:
 5432            singular = 'kernel'
 5433        writer.write_start(singular)
 5434        href = obj.href
 5435        if href is not None:
 5436            writer.write_attribute('href', href)
 5437        if obj.version is not None:
 5438            VersionWriter.write_one(obj.version, writer, 'version')
 5439        writer.write_end()
 5440
 5441    @staticmethod
 5442    def write_many(objs, writer, singular=None, plural=None):
 5443        if singular is None:
 5444            singular = 'kernel'
 5445        if plural is None:
 5446            plural = 'kernels'
 5447        writer.write_start(plural)
 5448        if type(objs) == List:
 5449            href = objs.href
 5450            if href is not None:
 5451                writer.write_attribute('href', href)
 5452        for obj in objs:
 5453            KernelWriter.write_one(obj, writer, singular)
 5454        writer.write_end()
 5455
 5456
 5457class KsmWriter(Writer):
 5458
 5459    def __init__(self):
 5460        super(KsmWriter, self).__init__()
 5461
 5462    @staticmethod
 5463    def write_one(obj, writer, singular=None):
 5464        if singular is None:
 5465            singular = 'ksm'
 5466        writer.write_start(singular)
 5467        href = obj.href
 5468        if href is not None:
 5469            writer.write_attribute('href', href)
 5470        if obj.enabled is not None:
 5471            Writer.write_boolean(writer, 'enabled', obj.enabled)
 5472        if obj.merge_across_nodes is not None:
 5473            Writer.write_boolean(writer, 'merge_across_nodes', obj.merge_across_nodes)
 5474        writer.write_end()
 5475
 5476    @staticmethod
 5477    def write_many(objs, writer, singular=None, plural=None):
 5478        if singular is None:
 5479            singular = 'ksm'
 5480        if plural is None:
 5481            plural = 'ksms'
 5482        writer.write_start(plural)
 5483        if type(objs) == List:
 5484            href = objs.href
 5485            if href is not None:
 5486                writer.write_attribute('href', href)
 5487        for obj in objs:
 5488            KsmWriter.write_one(obj, writer, singular)
 5489        writer.write_end()
 5490
 5491
 5492class LinkLayerDiscoveryProtocolElementWriter(Writer):
 5493
 5494    def __init__(self):
 5495        super(LinkLayerDiscoveryProtocolElementWriter, self).__init__()
 5496
 5497    @staticmethod
 5498    def write_one(obj, writer, singular=None):
 5499        if singular is None:
 5500            singular = 'link_layer_discovery_protocol_element'
 5501        writer.write_start(singular)
 5502        href = obj.href
 5503        if href is not None:
 5504            writer.write_attribute('href', href)
 5505        if obj.id is not None:
 5506            writer.write_attribute('id', obj.id)
 5507        if obj.comment is not None:
 5508            Writer.write_string(writer, 'comment', obj.comment)
 5509        if obj.description is not None:
 5510            Writer.write_string(writer, 'description', obj.description)
 5511        if obj.name is not None:
 5512            Writer.write_string(writer, 'name', obj.name)
 5513        if obj.oui is not None:
 5514            Writer.write_integer(writer, 'oui', obj.oui)
 5515        if obj.properties is not None:
 5516            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
 5517        if obj.subtype is not None:
 5518            Writer.write_integer(writer, 'subtype', obj.subtype)
 5519        if obj.type is not None:
 5520            Writer.write_integer(writer, 'type', obj.type)
 5521        writer.write_end()
 5522
 5523    @staticmethod
 5524    def write_many(objs, writer, singular=None, plural=None):
 5525        if singular is None:
 5526            singular = 'link_layer_discovery_protocol_element'
 5527        if plural is None:
 5528            plural = 'link_layer_discovery_protocol_elements'
 5529        writer.write_start(plural)
 5530        if type(objs) == List:
 5531            href = objs.href
 5532            if href is not None:
 5533                writer.write_attribute('href', href)
 5534        for obj in objs:
 5535            LinkLayerDiscoveryProtocolElementWriter.write_one(obj, writer, singular)
 5536        writer.write_end()
 5537
 5538
 5539class LogicalUnitWriter(Writer):
 5540
 5541    def __init__(self):
 5542        super(LogicalUnitWriter, self).__init__()
 5543
 5544    @staticmethod
 5545    def write_one(obj, writer, singular=None):
 5546        if singular is None:
 5547            singular = 'logical_unit'
 5548        writer.write_start(singular)
 5549        href = obj.href
 5550        if href is not None:
 5551            writer.write_attribute('href', href)
 5552        if obj.id is not None:
 5553            writer.write_attribute('id', obj.id)
 5554        if obj.address is not None:
 5555            Writer.write_string(writer, 'address', obj.address)
 5556        if obj.discard_max_size is not None:
 5557            Writer.write_integer(writer, 'discard_max_size', obj.discard_max_size)
 5558        if obj.discard_zeroes_data is not None:
 5559            Writer.write_boolean(writer, 'discard_zeroes_data', obj.discard_zeroes_data)
 5560        if obj.disk_id is not None:
 5561            Writer.write_string(writer, 'disk_id', obj.disk_id)
 5562        if obj.lun_mapping is not None:
 5563            Writer.write_integer(writer, 'lun_mapping', obj.lun_mapping)
 5564        if obj.password is not None:
 5565            Writer.write_string(writer, 'password', obj.password)
 5566        if obj.paths is not None:
 5567            Writer.write_integer(writer, 'paths', obj.paths)
 5568        if obj.port is not None:
 5569            Writer.write_integer(writer, 'port', obj.port)
 5570        if obj.portal is not None:
 5571            Writer.write_string(writer, 'portal', obj.portal)
 5572        if obj.product_id is not None:
 5573            Writer.write_string(writer, 'product_id', obj.product_id)
 5574        if obj.serial is not None:
 5575            Writer.write_string(writer, 'serial', obj.serial)
 5576        if obj.size is not None:
 5577            Writer.write_integer(writer, 'size', obj.size)
 5578        if obj.status is not None:
 5579            Writer.write_string(writer, 'status', obj.status.value)
 5580        if obj.storage_domain_id is not None:
 5581            Writer.write_string(writer, 'storage_domain_id', obj.storage_domain_id)
 5582        if obj.target is not None:
 5583            Writer.write_string(writer, 'target', obj.target)
 5584        if obj.username is not None:
 5585            Writer.write_string(writer, 'username', obj.username)
 5586        if obj.vendor_id is not None:
 5587            Writer.write_string(writer, 'vendor_id', obj.vendor_id)
 5588        if obj.volume_group_id is not None:
 5589            Writer.write_string(writer, 'volume_group_id', obj.volume_group_id)
 5590        writer.write_end()
 5591
 5592    @staticmethod
 5593    def write_many(objs, writer, singular=None, plural=None):
 5594        if singular is None:
 5595            singular = 'logical_unit'
 5596        if plural is None:
 5597            plural = 'logical_units'
 5598        writer.write_start(plural)
 5599        if type(objs) == List:
 5600            href = objs.href
 5601            if href is not None:
 5602                writer.write_attribute('href', href)
 5603        for obj in objs:
 5604            LogicalUnitWriter.write_one(obj, writer, singular)
 5605        writer.write_end()
 5606
 5607
 5608class MDevTypeWriter(Writer):
 5609
 5610    def __init__(self):
 5611        super(MDevTypeWriter, self).__init__()
 5612
 5613    @staticmethod
 5614    def write_one(obj, writer, singular=None):
 5615        if singular is None:
 5616            singular = 'm_dev_type'
 5617        writer.write_start(singular)
 5618        href = obj.href
 5619        if href is not None:
 5620            writer.write_attribute('href', href)
 5621        if obj.available_instances is not None:
 5622            Writer.write_integer(writer, 'available_instances', obj.available_instances)
 5623        if obj.description is not None:
 5624            Writer.write_string(writer, 'description', obj.description)
 5625        if obj.human_readable_name is not None:
 5626            Writer.write_string(writer, 'human_readable_name', obj.human_readable_name)
 5627        if obj.name is not None:
 5628            Writer.write_string(writer, 'name', obj.name)
 5629        writer.write_end()
 5630
 5631    @staticmethod
 5632    def write_many(objs, writer, singular=None, plural=None):
 5633        if singular is None:
 5634            singular = 'm_dev_type'
 5635        if plural is None:
 5636            plural = 'm_dev_types'
 5637        writer.write_start(plural)
 5638        if type(objs) == List:
 5639            href = objs.href
 5640            if href is not None:
 5641                writer.write_attribute('href', href)
 5642        for obj in objs:
 5643            MDevTypeWriter.write_one(obj, writer, singular)
 5644        writer.write_end()
 5645
 5646
 5647class MacWriter(Writer):
 5648
 5649    def __init__(self):
 5650        super(MacWriter, self).__init__()
 5651
 5652    @staticmethod
 5653    def write_one(obj, writer, singular=None):
 5654        if singular is None:
 5655            singular = 'mac'
 5656        writer.write_start(singular)
 5657        href = obj.href
 5658        if href is not None:
 5659            writer.write_attribute('href', href)
 5660        if obj.address is not None:
 5661            Writer.write_string(writer, 'address', obj.address)
 5662        writer.write_end()
 5663
 5664    @staticmethod
 5665    def write_many(objs, writer, singular=None, plural=None):
 5666        if singular is None:
 5667            singular = 'mac'
 5668        if plural is None:
 5669            plural = 'macs'
 5670        writer.write_start(plural)
 5671        if type(objs) == List:
 5672            href = objs.href
 5673            if href is not None:
 5674                writer.write_attribute('href', href)
 5675        for obj in objs:
 5676            MacWriter.write_one(obj, writer, singular)
 5677        writer.write_end()
 5678
 5679
 5680class MacPoolWriter(Writer):
 5681
 5682    def __init__(self):
 5683        super(MacPoolWriter, self).__init__()
 5684
 5685    @staticmethod
 5686    def write_one(obj, writer, singular=None):
 5687        if singular is None:
 5688            singular = 'mac_pool'
 5689        writer.write_start(singular)
 5690        href = obj.href
 5691        if href is not None:
 5692            writer.write_attribute('href', href)
 5693        if obj.id is not None:
 5694            writer.write_attribute('id', obj.id)
 5695        if obj.allow_duplicates is not None:
 5696            Writer.write_boolean(writer, 'allow_duplicates', obj.allow_duplicates)
 5697        if obj.comment is not None:
 5698            Writer.write_string(writer, 'comment', obj.comment)
 5699        if obj.default_pool is not None:
 5700            Writer.write_boolean(writer, 'default_pool', obj.default_pool)
 5701        if obj.description is not None:
 5702            Writer.write_string(writer, 'description', obj.description)
 5703        if obj.name is not None:
 5704            Writer.write_string(writer, 'name', obj.name)
 5705        if obj.ranges is not None:
 5706            RangeWriter.write_many(obj.ranges, writer, 'range', 'ranges')
 5707        if obj.permissions is not None:
 5708            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 5709        writer.write_end()
 5710
 5711    @staticmethod
 5712    def write_many(objs, writer, singular=None, plural=None):
 5713        if singular is None:
 5714            singular = 'mac_pool'
 5715        if plural is None:
 5716            plural = 'mac_pools'
 5717        writer.write_start(plural)
 5718        if type(objs) == List:
 5719            href = objs.href
 5720            if href is not None:
 5721                writer.write_attribute('href', href)
 5722        for obj in objs:
 5723            MacPoolWriter.write_one(obj, writer, singular)
 5724        writer.write_end()
 5725
 5726
 5727class MemoryOverCommitWriter(Writer):
 5728
 5729    def __init__(self):
 5730        super(MemoryOverCommitWriter, self).__init__()
 5731
 5732    @staticmethod
 5733    def write_one(obj, writer, singular=None):
 5734        if singular is None:
 5735            singular = 'memory_over_commit'
 5736        writer.write_start(singular)
 5737        href = obj.href
 5738        if href is not None:
 5739            writer.write_attribute('href', href)
 5740        if obj.percent is not None:
 5741            Writer.write_integer(writer, 'percent', obj.percent)
 5742        writer.write_end()
 5743
 5744    @staticmethod
 5745    def write_many(objs, writer, singular=None, plural=None):
 5746        if singular is None:
 5747            singular = 'memory_over_commit'
 5748        if plural is None:
 5749            plural = 'memory_over_commits'
 5750        writer.write_start(plural)
 5751        if type(objs) == List:
 5752            href = objs.href
 5753            if href is not None:
 5754                writer.write_attribute('href', href)
 5755        for obj in objs:
 5756            MemoryOverCommitWriter.write_one(obj, writer, singular)
 5757        writer.write_end()
 5758
 5759
 5760class MemoryPolicyWriter(Writer):
 5761
 5762    def __init__(self):
 5763        super(MemoryPolicyWriter, self).__init__()
 5764
 5765    @staticmethod
 5766    def write_one(obj, writer, singular=None):
 5767        if singular is None:
 5768            singular = 'memory_policy'
 5769        writer.write_start(singular)
 5770        href = obj.href
 5771        if href is not None:
 5772            writer.write_attribute('href', href)
 5773        if obj.ballooning is not None:
 5774            Writer.write_boolean(writer, 'ballooning', obj.ballooning)
 5775        if obj.guaranteed is not None:
 5776            Writer.write_integer(writer, 'guaranteed', obj.guaranteed)
 5777        if obj.max is not None:
 5778            Writer.write_integer(writer, 'max', obj.max)
 5779        if obj.over_commit is not None:
 5780            MemoryOverCommitWriter.write_one(obj.over_commit, writer, 'over_commit')
 5781        if obj.transparent_huge_pages is not None:
 5782            TransparentHugePagesWriter.write_one(obj.transparent_huge_pages, writer, 'transparent_hugepages')
 5783        writer.write_end()
 5784
 5785    @staticmethod
 5786    def write_many(objs, writer, singular=None, plural=None):
 5787        if singular is None:
 5788            singular = 'memory_policy'
 5789        if plural is None:
 5790            plural = 'memory_policies'
 5791        writer.write_start(plural)
 5792        if type(objs) == List:
 5793            href = objs.href
 5794            if href is not None:
 5795                writer.write_attribute('href', href)
 5796        for obj in objs:
 5797            MemoryPolicyWriter.write_one(obj, writer, singular)
 5798        writer.write_end()
 5799
 5800
 5801class MethodWriter(Writer):
 5802
 5803    def __init__(self):
 5804        super(MethodWriter, self).__init__()
 5805
 5806    @staticmethod
 5807    def write_one(obj, writer, singular=None):
 5808        if singular is None:
 5809            singular = 'method'
 5810        writer.write_start(singular)
 5811        href = obj.href
 5812        if href is not None:
 5813            writer.write_attribute('href', href)
 5814        if obj.id is not None:
 5815            writer.write_attribute('id', obj.id.value)
 5816        writer.write_end()
 5817
 5818    @staticmethod
 5819    def write_many(objs, writer, singular=None, plural=None):
 5820        if singular is None:
 5821            singular = 'method'
 5822        if plural is None:
 5823            plural = 'methods'
 5824        writer.write_start(plural)
 5825        if type(objs) == List:
 5826            href = objs.href
 5827            if href is not None:
 5828                writer.write_attribute('href', href)
 5829        for obj in objs:
 5830            MethodWriter.write_one(obj, writer, singular)
 5831        writer.write_end()
 5832
 5833
 5834class MigrationBandwidthWriter(Writer):
 5835
 5836    def __init__(self):
 5837        super(MigrationBandwidthWriter, self).__init__()
 5838
 5839    @staticmethod
 5840    def write_one(obj, writer, singular=None):
 5841        if singular is None:
 5842            singular = 'migration_bandwidth'
 5843        writer.write_start(singular)
 5844        href = obj.href
 5845        if href is not None:
 5846            writer.write_attribute('href', href)
 5847        if obj.assignment_method is not None:
 5848            Writer.write_string(writer, 'assignment_method', obj.assignment_method.value)
 5849        if obj.custom_value is not None:
 5850            Writer.write_integer(writer, 'custom_value', obj.custom_value)
 5851        writer.write_end()
 5852
 5853    @staticmethod
 5854    def write_many(objs, writer, singular=None, plural=None):
 5855        if singular is None:
 5856            singular = 'migration_bandwidth'
 5857        if plural is None:
 5858            plural = 'migration_bandwidths'
 5859        writer.write_start(plural)
 5860        if type(objs) == List:
 5861            href = objs.href
 5862            if href is not None:
 5863                writer.write_attribute('href', href)
 5864        for obj in objs:
 5865            MigrationBandwidthWriter.write_one(obj, writer, singular)
 5866        writer.write_end()
 5867
 5868
 5869class MigrationOptionsWriter(Writer):
 5870
 5871    def __init__(self):
 5872        super(MigrationOptionsWriter, self).__init__()
 5873
 5874    @staticmethod
 5875    def write_one(obj, writer, singular=None):
 5876        if singular is None:
 5877            singular = 'migration'
 5878        writer.write_start(singular)
 5879        href = obj.href
 5880        if href is not None:
 5881            writer.write_attribute('href', href)
 5882        if obj.auto_converge is not None:
 5883            Writer.write_string(writer, 'auto_converge', obj.auto_converge.value)
 5884        if obj.bandwidth is not None:
 5885            MigrationBandwidthWriter.write_one(obj.bandwidth, writer, 'bandwidth')
 5886        if obj.compressed is not None:
 5887            Writer.write_string(writer, 'compressed', obj.compressed.value)
 5888        if obj.custom_parallel_migrations is not None:
 5889            Writer.write_integer(writer, 'custom_parallel_migrations', obj.custom_parallel_migrations)
 5890        if obj.encrypted is not None:
 5891            Writer.write_string(writer, 'encrypted', obj.encrypted.value)
 5892        if obj.parallel_migrations_policy is not None:
 5893            Writer.write_string(writer, 'parallel_migrations_policy', obj.parallel_migrations_policy.value)
 5894        if obj.policy is not None:
 5895            MigrationPolicyWriter.write_one(obj.policy, writer, 'policy')
 5896        writer.write_end()
 5897
 5898    @staticmethod
 5899    def write_many(objs, writer, singular=None, plural=None):
 5900        if singular is None:
 5901            singular = 'migration'
 5902        if plural is None:
 5903            plural = 'migration_optionss'
 5904        writer.write_start(plural)
 5905        if type(objs) == List:
 5906            href = objs.href
 5907            if href is not None:
 5908                writer.write_attribute('href', href)
 5909        for obj in objs:
 5910            MigrationOptionsWriter.write_one(obj, writer, singular)
 5911        writer.write_end()
 5912
 5913
 5914class MigrationPolicyWriter(Writer):
 5915
 5916    def __init__(self):
 5917        super(MigrationPolicyWriter, self).__init__()
 5918
 5919    @staticmethod
 5920    def write_one(obj, writer, singular=None):
 5921        if singular is None:
 5922            singular = 'migration_policy'
 5923        writer.write_start(singular)
 5924        href = obj.href
 5925        if href is not None:
 5926            writer.write_attribute('href', href)
 5927        if obj.id is not None:
 5928            writer.write_attribute('id', obj.id)
 5929        if obj.comment is not None:
 5930            Writer.write_string(writer, 'comment', obj.comment)
 5931        if obj.description is not None:
 5932            Writer.write_string(writer, 'description', obj.description)
 5933        if obj.name is not None:
 5934            Writer.write_string(writer, 'name', obj.name)
 5935        writer.write_end()
 5936
 5937    @staticmethod
 5938    def write_many(objs, writer, singular=None, plural=None):
 5939        if singular is None:
 5940            singular = 'migration_policy'
 5941        if plural is None:
 5942            plural = 'migration_policies'
 5943        writer.write_start(plural)
 5944        if type(objs) == List:
 5945            href = objs.href
 5946            if href is not None:
 5947                writer.write_attribute('href', href)
 5948        for obj in objs:
 5949            MigrationPolicyWriter.write_one(obj, writer, singular)
 5950        writer.write_end()
 5951
 5952
 5953class NetworkWriter(Writer):
 5954
 5955    def __init__(self):
 5956        super(NetworkWriter, self).__init__()
 5957
 5958    @staticmethod
 5959    def write_one(obj, writer, singular=None):
 5960        if singular is None:
 5961            singular = 'network'
 5962        writer.write_start(singular)
 5963        href = obj.href
 5964        if href is not None:
 5965            writer.write_attribute('href', href)
 5966        if obj.id is not None:
 5967            writer.write_attribute('id', obj.id)
 5968        if obj.comment is not None:
 5969            Writer.write_string(writer, 'comment', obj.comment)
 5970        if obj.description is not None:
 5971            Writer.write_string(writer, 'description', obj.description)
 5972        if obj.display is not None:
 5973            Writer.write_boolean(writer, 'display', obj.display)
 5974        if obj.dns_resolver_configuration is not None:
 5975            DnsResolverConfigurationWriter.write_one(obj.dns_resolver_configuration, writer, 'dns_resolver_configuration')
 5976        if obj.ip is not None:
 5977            IpWriter.write_one(obj.ip, writer, 'ip')
 5978        if obj.mtu is not None:
 5979            Writer.write_integer(writer, 'mtu', obj.mtu)
 5980        if obj.name is not None:
 5981            Writer.write_string(writer, 'name', obj.name)
 5982        if obj.port_isolation is not None:
 5983            Writer.write_boolean(writer, 'port_isolation', obj.port_isolation)
 5984        if obj.profile_required is not None:
 5985            Writer.write_boolean(writer, 'profile_required', obj.profile_required)
 5986        if obj.required is not None:
 5987            Writer.write_boolean(writer, 'required', obj.required)
 5988        if obj.status is not None:
 5989            Writer.write_string(writer, 'status', obj.status.value)
 5990        if obj.stp is not None:
 5991            Writer.write_boolean(writer, 'stp', obj.stp)
 5992        if obj.usages is not None:
 5993            writer.write_start('usages')
 5994            for item in obj.usages:
 5995                if item is not None:
 5996                    Writer.write_string(writer, 'usage', item.value)
 5997            writer.write_end()
 5998        if obj.vdsm_name is not None:
 5999            Writer.write_string(writer, 'vdsm_name', obj.vdsm_name)
 6000        if obj.vlan is not None:
 6001            VlanWriter.write_one(obj.vlan, writer, 'vlan')
 6002        if obj.cluster is not None:
 6003            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
 6004        if obj.data_center is not None:
 6005            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
 6006        if obj.external_provider is not None:
 6007            OpenStackNetworkProviderWriter.write_one(obj.external_provider, writer, 'external_provider')
 6008        if obj.external_provider_physical_network is not None:
 6009            NetworkWriter.write_one(obj.external_provider_physical_network, writer, 'external_provider_physical_network')
 6010        if obj.network_labels is not None:
 6011            NetworkLabelWriter.write_many(obj.network_labels, writer, 'network_label', 'network_labels')
 6012        if obj.permissions is not None:
 6013            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 6014        if obj.qos is not None:
 6015            QosWriter.write_one(obj.qos, writer, 'qos')
 6016        if obj.vnic_profiles is not None:
 6017            VnicProfileWriter.write_many(obj.vnic_profiles, writer, 'vnic_profile', 'vnic_profiles')
 6018        writer.write_end()
 6019
 6020    @staticmethod
 6021    def write_many(objs, writer, singular=None, plural=None):
 6022        if singular is None:
 6023            singular = 'network'
 6024        if plural is None:
 6025            plural = 'networks'
 6026        writer.write_start(plural)
 6027        if type(objs) == List:
 6028            href = objs.href
 6029            if href is not None:
 6030                writer.write_attribute('href', href)
 6031        for obj in objs:
 6032            NetworkWriter.write_one(obj, writer, singular)
 6033        writer.write_end()
 6034
 6035
 6036class NetworkAttachmentWriter(Writer):
 6037
 6038    def __init__(self):
 6039        super(NetworkAttachmentWriter, self).__init__()
 6040
 6041    @staticmethod
 6042    def write_one(obj, writer, singular=None):
 6043        if singular is None:
 6044            singular = 'network_attachment'
 6045        writer.write_start(singular)
 6046        href = obj.href
 6047        if href is not None:
 6048            writer.write_attribute('href', href)
 6049        if obj.id is not None:
 6050            writer.write_attribute('id', obj.id)
 6051        if obj.comment is not None:
 6052            Writer.write_string(writer, 'comment', obj.comment)
 6053        if obj.description is not None:
 6054            Writer.write_string(writer, 'description', obj.description)
 6055        if obj.dns_resolver_configuration is not None:
 6056            DnsResolverConfigurationWriter.write_one(obj.dns_resolver_configuration, writer, 'dns_resolver_configuration')
 6057        if obj.in_sync is not None:
 6058            Writer.write_boolean(writer, 'in_sync', obj.in_sync)
 6059        if obj.ip_address_assignments is not None:
 6060            IpAddressAssignmentWriter.write_many(obj.ip_address_assignments, writer, 'ip_address_assignment', 'ip_address_assignments')
 6061        if obj.name is not None:
 6062            Writer.write_string(writer, 'name', obj.name)
 6063        if obj.properties is not None:
 6064            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
 6065        if obj.reported_configurations is not None:
 6066            ReportedConfigurationWriter.write_many(obj.reported_configurations, writer, 'reported_configuration', 'reported_configurations')
 6067        if obj.host is not None:
 6068            HostWriter.write_one(obj.host, writer, 'host')
 6069        if obj.host_nic is not None:
 6070            HostNicWriter.write_one(obj.host_nic, writer, 'host_nic')
 6071        if obj.network is not None:
 6072            NetworkWriter.write_one(obj.network, writer, 'network')
 6073        if obj.qos is not None:
 6074            QosWriter.write_one(obj.qos, writer, 'qos')
 6075        writer.write_end()
 6076
 6077    @staticmethod
 6078    def write_many(objs, writer, singular=None, plural=None):
 6079        if singular is None:
 6080            singular = 'network_attachment'
 6081        if plural is None:
 6082            plural = 'network_attachments'
 6083        writer.write_start(plural)
 6084        if type(objs) == List:
 6085            href = objs.href
 6086            if href is not None:
 6087                writer.write_attribute('href', href)
 6088        for obj in objs:
 6089            NetworkAttachmentWriter.write_one(obj, writer, singular)
 6090        writer.write_end()
 6091
 6092
 6093class NetworkConfigurationWriter(Writer):
 6094
 6095    def __init__(self):
 6096        super(NetworkConfigurationWriter, self).__init__()
 6097
 6098    @staticmethod
 6099    def write_one(obj, writer, singular=None):
 6100        if singular is None:
 6101            singular = 'network_configuration'
 6102        writer.write_start(singular)
 6103        href = obj.href
 6104        if href is not None:
 6105            writer.write_attribute('href', href)
 6106        if obj.dns is not None:
 6107            DnsWriter.write_one(obj.dns, writer, 'dns')
 6108        if obj.nics is not None:
 6109            NicWriter.write_many(obj.nics, writer, 'nic', 'nics')
 6110        writer.write_end()
 6111
 6112    @staticmethod
 6113    def write_many(objs, writer, singular=None, plural=None):
 6114        if singular is None:
 6115            singular = 'network_configuration'
 6116        if plural is None:
 6117            plural = 'network_configurations'
 6118        writer.write_start(plural)
 6119        if type(objs) == List:
 6120            href = objs.href
 6121            if href is not None:
 6122                writer.write_attribute('href', href)
 6123        for obj in objs:
 6124            NetworkConfigurationWriter.write_one(obj, writer, singular)
 6125        writer.write_end()
 6126
 6127
 6128class NetworkFilterWriter(Writer):
 6129
 6130    def __init__(self):
 6131        super(NetworkFilterWriter, self).__init__()
 6132
 6133    @staticmethod
 6134    def write_one(obj, writer, singular=None):
 6135        if singular is None:
 6136            singular = 'network_filter'
 6137        writer.write_start(singular)
 6138        href = obj.href
 6139        if href is not None:
 6140            writer.write_attribute('href', href)
 6141        if obj.id is not None:
 6142            writer.write_attribute('id', obj.id)
 6143        if obj.comment is not None:
 6144            Writer.write_string(writer, 'comment', obj.comment)
 6145        if obj.description is not None:
 6146            Writer.write_string(writer, 'description', obj.description)
 6147        if obj.name is not None:
 6148            Writer.write_string(writer, 'name', obj.name)
 6149        if obj.version is not None:
 6150            VersionWriter.write_one(obj.version, writer, 'version')
 6151        writer.write_end()
 6152
 6153    @staticmethod
 6154    def write_many(objs, writer, singular=None, plural=None):
 6155        if singular is None:
 6156            singular = 'network_filter'
 6157        if plural is None:
 6158            plural = 'network_filters'
 6159        writer.write_start(plural)
 6160        if type(objs) == List:
 6161            href = objs.href
 6162            if href is not None:
 6163                writer.write_attribute('href', href)
 6164        for obj in objs:
 6165            NetworkFilterWriter.write_one(obj, writer, singular)
 6166        writer.write_end()
 6167
 6168
 6169class NetworkFilterParameterWriter(Writer):
 6170
 6171    def __init__(self):
 6172        super(NetworkFilterParameterWriter, self).__init__()
 6173
 6174    @staticmethod
 6175    def write_one(obj, writer, singular=None):
 6176        if singular is None:
 6177            singular = 'network_filter_parameter'
 6178        writer.write_start(singular)
 6179        href = obj.href
 6180        if href is not None:
 6181            writer.write_attribute('href', href)
 6182        if obj.id is not None:
 6183            writer.write_attribute('id', obj.id)
 6184        if obj.comment is not None:
 6185            Writer.write_string(writer, 'comment', obj.comment)
 6186        if obj.description is not None:
 6187            Writer.write_string(writer, 'description', obj.description)
 6188        if obj.name is not None:
 6189            Writer.write_string(writer, 'name', obj.name)
 6190        if obj.value is not None:
 6191            Writer.write_string(writer, 'value', obj.value)
 6192        if obj.nic is not None:
 6193            NicWriter.write_one(obj.nic, writer, 'nic')
 6194        writer.write_end()
 6195
 6196    @staticmethod
 6197    def write_many(objs, writer, singular=None, plural=None):
 6198        if singular is None:
 6199            singular = 'network_filter_parameter'
 6200        if plural is None:
 6201            plural = 'network_filter_parameters'
 6202        writer.write_start(plural)
 6203        if type(objs) == List:
 6204            href = objs.href
 6205            if href is not None:
 6206                writer.write_attribute('href', href)
 6207        for obj in objs:
 6208            NetworkFilterParameterWriter.write_one(obj, writer, singular)
 6209        writer.write_end()
 6210
 6211
 6212class NetworkLabelWriter(Writer):
 6213
 6214    def __init__(self):
 6215        super(NetworkLabelWriter, self).__init__()
 6216
 6217    @staticmethod
 6218    def write_one(obj, writer, singular=None):
 6219        if singular is None:
 6220            singular = 'network_label'
 6221        writer.write_start(singular)
 6222        href = obj.href
 6223        if href is not None:
 6224            writer.write_attribute('href', href)
 6225        if obj.id is not None:
 6226            writer.write_attribute('id', obj.id)
 6227        if obj.comment is not None:
 6228            Writer.write_string(writer, 'comment', obj.comment)
 6229        if obj.description is not None:
 6230            Writer.write_string(writer, 'description', obj.description)
 6231        if obj.name is not None:
 6232            Writer.write_string(writer, 'name', obj.name)
 6233        if obj.host_nic is not None:
 6234            HostNicWriter.write_one(obj.host_nic, writer, 'host_nic')
 6235        if obj.network is not None:
 6236            NetworkWriter.write_one(obj.network, writer, 'network')
 6237        writer.write_end()
 6238
 6239    @staticmethod
 6240    def write_many(objs, writer, singular=None, plural=None):
 6241        if singular is None:
 6242            singular = 'network_label'
 6243        if plural is None:
 6244            plural = 'network_labels'
 6245        writer.write_start(plural)
 6246        if type(objs) == List:
 6247            href = objs.href
 6248            if href is not None:
 6249                writer.write_attribute('href', href)
 6250        for obj in objs:
 6251            NetworkLabelWriter.write_one(obj, writer, singular)
 6252        writer.write_end()
 6253
 6254
 6255class NfsProfileDetailWriter(Writer):
 6256
 6257    def __init__(self):
 6258        super(NfsProfileDetailWriter, self).__init__()
 6259
 6260    @staticmethod
 6261    def write_one(obj, writer, singular=None):
 6262        if singular is None:
 6263            singular = 'nfs_profile_detail'
 6264        writer.write_start(singular)
 6265        href = obj.href
 6266        if href is not None:
 6267            writer.write_attribute('href', href)
 6268        if obj.nfs_server_ip is not None:
 6269            Writer.write_string(writer, 'nfs_server_ip', obj.nfs_server_ip)
 6270        if obj.profile_details is not None:
 6271            ProfileDetailWriter.write_many(obj.profile_details, writer, 'profile_detail', 'profile_details')
 6272        writer.write_end()
 6273
 6274    @staticmethod
 6275    def write_many(objs, writer, singular=None, plural=None):
 6276        if singular is None:
 6277            singular = 'nfs_profile_detail'
 6278        if plural is None:
 6279            plural = 'nfs_profile_details'
 6280        writer.write_start(plural)
 6281        if type(objs) == List:
 6282            href = objs.href
 6283            if href is not None:
 6284                writer.write_attribute('href', href)
 6285        for obj in objs:
 6286            NfsProfileDetailWriter.write_one(obj, writer, singular)
 6287        writer.write_end()
 6288
 6289
 6290class NicWriter(Writer):
 6291
 6292    def __init__(self):
 6293        super(NicWriter, self).__init__()
 6294
 6295    @staticmethod
 6296    def write_one(obj, writer, singular=None):
 6297        if singular is None:
 6298            singular = 'nic'
 6299        writer.write_start(singular)
 6300        href = obj.href
 6301        if href is not None:
 6302            writer.write_attribute('href', href)
 6303        if obj.id is not None:
 6304            writer.write_attribute('id', obj.id)
 6305        if obj.boot_protocol is not None:
 6306            Writer.write_string(writer, 'boot_protocol', obj.boot_protocol.value)
 6307        if obj.comment is not None:
 6308            Writer.write_string(writer, 'comment', obj.comment)
 6309        if obj.description is not None:
 6310            Writer.write_string(writer, 'description', obj.description)
 6311        if obj.interface is not None:
 6312            Writer.write_string(writer, 'interface', obj.interface.value)
 6313        if obj.linked is not None:
 6314            Writer.write_boolean(writer, 'linked', obj.linked)
 6315        if obj.mac is not None:
 6316            MacWriter.write_one(obj.mac, writer, 'mac')
 6317        if obj.name is not None:
 6318            Writer.write_string(writer, 'name', obj.name)
 6319        if obj.on_boot is not None:
 6320            Writer.write_boolean(writer, 'on_boot', obj.on_boot)
 6321        if obj.plugged is not None:
 6322            Writer.write_boolean(writer, 'plugged', obj.plugged)
 6323        if obj.synced is not None:
 6324            Writer.write_boolean(writer, 'synced', obj.synced)
 6325        if obj.instance_type is not None:
 6326            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
 6327        if obj.network is not None:
 6328            NetworkWriter.write_one(obj.network, writer, 'network')
 6329        if obj.network_attachments is not None:
 6330            NetworkAttachmentWriter.write_many(obj.network_attachments, writer, 'network_attachment', 'network_attachments')
 6331        if obj.network_filter_parameters is not None:
 6332            NetworkFilterParameterWriter.write_many(obj.network_filter_parameters, writer, 'network_filter_parameter', 'network_filter_parameters')
 6333        if obj.network_labels is not None:
 6334            NetworkLabelWriter.write_many(obj.network_labels, writer, 'network_label', 'network_labels')
 6335        if obj.reported_devices is not None:
 6336            ReportedDeviceWriter.write_many(obj.reported_devices, writer, 'reported_device', 'reported_devices')
 6337        if obj.statistics is not None:
 6338            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
 6339        if obj.template is not None:
 6340            TemplateWriter.write_one(obj.template, writer, 'template')
 6341        if obj.virtual_function_allowed_labels is not None:
 6342            NetworkLabelWriter.write_many(obj.virtual_function_allowed_labels, writer, 'network_label', 'virtual_function_allowed_labels')
 6343        if obj.virtual_function_allowed_networks is not None:
 6344            NetworkWriter.write_many(obj.virtual_function_allowed_networks, writer, 'network', 'virtual_function_allowed_networks')
 6345        if obj.vm is not None:
 6346            VmWriter.write_one(obj.vm, writer, 'vm')
 6347        if obj.vms is not None:
 6348            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
 6349        if obj.vnic_profile is not None:
 6350            VnicProfileWriter.write_one(obj.vnic_profile, writer, 'vnic_profile')
 6351        writer.write_end()
 6352
 6353    @staticmethod
 6354    def write_many(objs, writer, singular=None, plural=None):
 6355        if singular is None:
 6356            singular = 'nic'
 6357        if plural is None:
 6358            plural = 'nics'
 6359        writer.write_start(plural)
 6360        if type(objs) == List:
 6361            href = objs.href
 6362            if href is not None:
 6363                writer.write_attribute('href', href)
 6364        for obj in objs:
 6365            NicWriter.write_one(obj, writer, singular)
 6366        writer.write_end()
 6367
 6368
 6369class NicConfigurationWriter(Writer):
 6370
 6371    def __init__(self):
 6372        super(NicConfigurationWriter, self).__init__()
 6373
 6374    @staticmethod
 6375    def write_one(obj, writer, singular=None):
 6376        if singular is None:
 6377            singular = 'nic_configuration'
 6378        writer.write_start(singular)
 6379        href = obj.href
 6380        if href is not None:
 6381            writer.write_attribute('href', href)
 6382        if obj.boot_protocol is not None:
 6383            Writer.write_string(writer, 'boot_protocol', obj.boot_protocol.value)
 6384        if obj.ip is not None:
 6385            IpWriter.write_one(obj.ip, writer, 'ip')
 6386        if obj.ipv6 is not None:
 6387            IpWriter.write_one(obj.ipv6, writer, 'ipv6')
 6388        if obj.ipv6_boot_protocol is not None:
 6389            Writer.write_string(writer, 'ipv6_boot_protocol', obj.ipv6_boot_protocol.value)
 6390        if obj.name is not None:
 6391            Writer.write_string(writer, 'name', obj.name)
 6392        if obj.on_boot is not None:
 6393            Writer.write_boolean(writer, 'on_boot', obj.on_boot)
 6394        writer.write_end()
 6395
 6396    @staticmethod
 6397    def write_many(objs, writer, singular=None, plural=None):
 6398        if singular is None:
 6399            singular = 'nic_configuration'
 6400        if plural is None:
 6401            plural = 'nic_configurations'
 6402        writer.write_start(plural)
 6403        if type(objs) == List:
 6404            href = objs.href
 6405            if href is not None:
 6406                writer.write_attribute('href', href)
 6407        for obj in objs:
 6408            NicConfigurationWriter.write_one(obj, writer, singular)
 6409        writer.write_end()
 6410
 6411
 6412class NumaNodeWriter(Writer):
 6413
 6414    def __init__(self):
 6415        super(NumaNodeWriter, self).__init__()
 6416
 6417    @staticmethod
 6418    def write_one(obj, writer, singular=None):
 6419        if singular is None:
 6420            singular = 'host_numa_node'
 6421        writer.write_start(singular)
 6422        href = obj.href
 6423        if href is not None:
 6424            writer.write_attribute('href', href)
 6425        if obj.id is not None:
 6426            writer.write_attribute('id', obj.id)
 6427        if obj.comment is not None:
 6428            Writer.write_string(writer, 'comment', obj.comment)
 6429        if obj.cpu is not None:
 6430            CpuWriter.write_one(obj.cpu, writer, 'cpu')
 6431        if obj.description is not None:
 6432            Writer.write_string(writer, 'description', obj.description)
 6433        if obj.index is not None:
 6434            Writer.write_integer(writer, 'index', obj.index)
 6435        if obj.memory is not None:
 6436            Writer.write_integer(writer, 'memory', obj.memory)
 6437        if obj.name is not None:
 6438            Writer.write_string(writer, 'name', obj.name)
 6439        if obj.node_distance is not None:
 6440            Writer.write_string(writer, 'node_distance', obj.node_distance)
 6441        if obj.host is not None:
 6442            HostWriter.write_one(obj.host, writer, 'host')
 6443        if obj.statistics is not None:
 6444            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
 6445        writer.write_end()
 6446
 6447    @staticmethod
 6448    def write_many(objs, writer, singular=None, plural=None):
 6449        if singular is None:
 6450            singular = 'host_numa_node'
 6451        if plural is None:
 6452            plural = 'host_numa_nodes'
 6453        writer.write_start(plural)
 6454        if type(objs) == List:
 6455            href = objs.href
 6456            if href is not None:
 6457                writer.write_attribute('href', href)
 6458        for obj in objs:
 6459            NumaNodeWriter.write_one(obj, writer, singular)
 6460        writer.write_end()
 6461
 6462
 6463class NumaNodePinWriter(Writer):
 6464
 6465    def __init__(self):
 6466        super(NumaNodePinWriter, self).__init__()
 6467
 6468    @staticmethod
 6469    def write_one(obj, writer, singular=None):
 6470        if singular is None:
 6471            singular = 'numa_node_pin'
 6472        writer.write_start(singular)
 6473        href = obj.href
 6474        if href is not None:
 6475            writer.write_attribute('href', href)
 6476        if obj.host_numa_node is not None:
 6477            NumaNodeWriter.write_one(obj.host_numa_node, writer, 'host_numa_node')
 6478        if obj.index is not None:
 6479            Writer.write_integer(writer, 'index', obj.index)
 6480        if obj.pinned is not None:
 6481            Writer.write_boolean(writer, 'pinned', obj.pinned)
 6482        writer.write_end()
 6483
 6484    @staticmethod
 6485    def write_many(objs, writer, singular=None, plural=None):
 6486        if singular is None:
 6487            singular = 'numa_node_pin'
 6488        if plural is None:
 6489            plural = 'numa_node_pins'
 6490        writer.write_start(plural)
 6491        if type(objs) == List:
 6492            href = objs.href
 6493            if href is not None:
 6494                writer.write_attribute('href', href)
 6495        for obj in objs:
 6496            NumaNodePinWriter.write_one(obj, writer, singular)
 6497        writer.write_end()
 6498
 6499
 6500class OpenStackImageWriter(Writer):
 6501
 6502    def __init__(self):
 6503        super(OpenStackImageWriter, self).__init__()
 6504
 6505    @staticmethod
 6506    def write_one(obj, writer, singular=None):
 6507        if singular is None:
 6508            singular = 'openstack_image'
 6509        writer.write_start(singular)
 6510        href = obj.href
 6511        if href is not None:
 6512            writer.write_attribute('href', href)
 6513        if obj.id is not None:
 6514            writer.write_attribute('id', obj.id)
 6515        if obj.comment is not None:
 6516            Writer.write_string(writer, 'comment', obj.comment)
 6517        if obj.description is not None:
 6518            Writer.write_string(writer, 'description', obj.description)
 6519        if obj.name is not None:
 6520            Writer.write_string(writer, 'name', obj.name)
 6521        if obj.openstack_image_provider is not None:
 6522            OpenStackImageProviderWriter.write_one(obj.openstack_image_provider, writer, 'openstack_image_provider')
 6523        writer.write_end()
 6524
 6525    @staticmethod
 6526    def write_many(objs, writer, singular=None, plural=None):
 6527        if singular is None:
 6528            singular = 'openstack_image'
 6529        if plural is None:
 6530            plural = 'openstack_images'
 6531        writer.write_start(plural)
 6532        if type(objs) == List:
 6533            href = objs.href
 6534            if href is not None:
 6535                writer.write_attribute('href', href)
 6536        for obj in objs:
 6537            OpenStackImageWriter.write_one(obj, writer, singular)
 6538        writer.write_end()
 6539
 6540
 6541class OpenStackImageProviderWriter(Writer):
 6542
 6543    def __init__(self):
 6544        super(OpenStackImageProviderWriter, self).__init__()
 6545
 6546    @staticmethod
 6547    def write_one(obj, writer, singular=None):
 6548        if singular is None:
 6549            singular = 'openstack_image_provider'
 6550        writer.write_start(singular)
 6551        href = obj.href
 6552        if href is not None:
 6553            writer.write_attribute('href', href)
 6554        if obj.id is not None:
 6555            writer.write_attribute('id', obj.id)
 6556        if obj.authentication_url is not None:
 6557            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
 6558        if obj.comment is not None:
 6559            Writer.write_string(writer, 'comment', obj.comment)
 6560        if obj.description is not None:
 6561            Writer.write_string(writer, 'description', obj.description)
 6562        if obj.name is not None:
 6563            Writer.write_string(writer, 'name', obj.name)
 6564        if obj.password is not None:
 6565            Writer.write_string(writer, 'password', obj.password)
 6566        if obj.properties is not None:
 6567            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
 6568        if obj.requires_authentication is not None:
 6569            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
 6570        if obj.tenant_name is not None:
 6571            Writer.write_string(writer, 'tenant_name', obj.tenant_name)
 6572        if obj.url is not None:
 6573            Writer.write_string(writer, 'url', obj.url)
 6574        if obj.username is not None:
 6575            Writer.write_string(writer, 'username', obj.username)
 6576        if obj.certificates is not None:
 6577            CertificateWriter.write_many(obj.certificates, writer, 'certificate', 'certificates')
 6578        if obj.images is not None:
 6579            OpenStackImageWriter.write_many(obj.images, writer, 'openstack_image', 'images')
 6580        writer.write_end()
 6581
 6582    @staticmethod
 6583    def write_many(objs, writer, singular=None, plural=None):
 6584        if singular is None:
 6585            singular = 'openstack_image_provider'
 6586        if plural is None:
 6587            plural = 'openstack_image_providers'
 6588        writer.write_start(plural)
 6589        if type(objs) == List:
 6590            href = objs.href
 6591            if href is not None:
 6592                writer.write_attribute('href', href)
 6593        for obj in objs:
 6594            OpenStackImageProviderWriter.write_one(obj, writer, singular)
 6595        writer.write_end()
 6596
 6597
 6598class OpenStackNetworkWriter(Writer):
 6599
 6600    def __init__(self):
 6601        super(OpenStackNetworkWriter, self).__init__()
 6602
 6603    @staticmethod
 6604    def write_one(obj, writer, singular=None):
 6605        if singular is None:
 6606            singular = 'openstack_network'
 6607        writer.write_start(singular)
 6608        href = obj.href
 6609        if href is not None:
 6610            writer.write_attribute('href', href)
 6611        if obj.id is not None:
 6612            writer.write_attribute('id', obj.id)
 6613        if obj.comment is not None:
 6614            Writer.write_string(writer, 'comment', obj.comment)
 6615        if obj.description is not None:
 6616            Writer.write_string(writer, 'description', obj.description)
 6617        if obj.name is not None:
 6618            Writer.write_string(writer, 'name', obj.name)
 6619        if obj.openstack_network_provider is not None:
 6620            OpenStackNetworkProviderWriter.write_one(obj.openstack_network_provider, writer, 'openstack_network_provider')
 6621        writer.write_end()
 6622
 6623    @staticmethod
 6624    def write_many(objs, writer, singular=None, plural=None):
 6625        if singular is None:
 6626            singular = 'openstack_network'
 6627        if plural is None:
 6628            plural = 'openstack_networks'
 6629        writer.write_start(plural)
 6630        if type(objs) == List:
 6631            href = objs.href
 6632            if href is not None:
 6633                writer.write_attribute('href', href)
 6634        for obj in objs:
 6635            OpenStackNetworkWriter.write_one(obj, writer, singular)
 6636        writer.write_end()
 6637
 6638
 6639class OpenStackNetworkProviderWriter(Writer):
 6640
 6641    def __init__(self):
 6642        super(OpenStackNetworkProviderWriter, self).__init__()
 6643
 6644    @staticmethod
 6645    def write_one(obj, writer, singular=None):
 6646        if singular is None:
 6647            singular = 'openstack_network_provider'
 6648        writer.write_start(singular)
 6649        href = obj.href
 6650        if href is not None:
 6651            writer.write_attribute('href', href)
 6652        if obj.id is not None:
 6653            writer.write_attribute('id', obj.id)
 6654        if obj.agent_configuration is not None:
 6655            AgentConfigurationWriter.write_one(obj.agent_configuration, writer, 'agent_configuration')
 6656        if obj.authentication_url is not None:
 6657            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
 6658        if obj.auto_sync is not None:
 6659            Writer.write_boolean(writer, 'auto_sync', obj.auto_sync)
 6660        if obj.comment is not None:
 6661            Writer.write_string(writer, 'comment', obj.comment)
 6662        if obj.description is not None:
 6663            Writer.write_string(writer, 'description', obj.description)
 6664        if obj.external_plugin_type is not None:
 6665            Writer.write_string(writer, 'external_plugin_type', obj.external_plugin_type)
 6666        if obj.name is not None:
 6667            Writer.write_string(writer, 'name', obj.name)
 6668        if obj.password is not None:
 6669            Writer.write_string(writer, 'password', obj.password)
 6670        if obj.plugin_type is not None:
 6671            Writer.write_string(writer, 'plugin_type', obj.plugin_type.value)
 6672        if obj.project_domain_name is not None:
 6673            Writer.write_string(writer, 'project_domain_name', obj.project_domain_name)
 6674        if obj.project_name is not None:
 6675            Writer.write_string(writer, 'project_name', obj.project_name)
 6676        if obj.properties is not None:
 6677            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
 6678        if obj.read_only is not None:
 6679            Writer.write_boolean(writer, 'read_only', obj.read_only)
 6680        if obj.requires_authentication is not None:
 6681            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
 6682        if obj.tenant_name is not None:
 6683            Writer.write_string(writer, 'tenant_name', obj.tenant_name)
 6684        if obj.type is not None:
 6685            Writer.write_string(writer, 'type', obj.type.value)
 6686        if obj.unmanaged is not None:
 6687            Writer.write_boolean(writer, 'unmanaged', obj.unmanaged)
 6688        if obj.url is not None:
 6689            Writer.write_string(writer, 'url', obj.url)
 6690        if obj.user_domain_name is not None:
 6691            Writer.write_string(writer, 'user_domain_name', obj.user_domain_name)
 6692        if obj.username is not None:
 6693            Writer.write_string(writer, 'username', obj.username)
 6694        if obj.certificates is not None:
 6695            CertificateWriter.write_many(obj.certificates, writer, 'certificate', 'certificates')
 6696        if obj.networks is not None:
 6697            OpenStackNetworkWriter.write_many(obj.networks, writer, 'openstack_network', 'networks')
 6698        if obj.subnets is not None:
 6699            OpenStackSubnetWriter.write_many(obj.subnets, writer, 'openstack_subnet', 'subnets')
 6700        writer.write_end()
 6701
 6702    @staticmethod
 6703    def write_many(objs, writer, singular=None, plural=None):
 6704        if singular is None:
 6705            singular = 'openstack_network_provider'
 6706        if plural is None:
 6707            plural = 'openstack_network_providers'
 6708        writer.write_start(plural)
 6709        if type(objs) == List:
 6710            href = objs.href
 6711            if href is not None:
 6712                writer.write_attribute('href', href)
 6713        for obj in objs:
 6714            OpenStackNetworkProviderWriter.write_one(obj, writer, singular)
 6715        writer.write_end()
 6716
 6717
 6718class OpenStackProviderWriter(Writer):
 6719
 6720    def __init__(self):
 6721        super(OpenStackProviderWriter, self).__init__()
 6722
 6723    @staticmethod
 6724    def write_one(obj, writer, singular=None):
 6725        if singular is None:
 6726            singular = 'open_stack_provider'
 6727        writer.write_start(singular)
 6728        href = obj.href
 6729        if href is not None:
 6730            writer.write_attribute('href', href)
 6731        if obj.id is not None:
 6732            writer.write_attribute('id', obj.id)
 6733        if obj.authentication_url is not None:
 6734            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
 6735        if obj.comment is not None:
 6736            Writer.write_string(writer, 'comment', obj.comment)
 6737        if obj.description is not None:
 6738            Writer.write_string(writer, 'description', obj.description)
 6739        if obj.name is not None:
 6740            Writer.write_string(writer, 'name', obj.name)
 6741        if obj.password is not None:
 6742            Writer.write_string(writer, 'password', obj.password)
 6743        if obj.properties is not None:
 6744            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
 6745        if obj.requires_authentication is not None:
 6746            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
 6747        if obj.tenant_name is not None:
 6748            Writer.write_string(writer, 'tenant_name', obj.tenant_name)
 6749        if obj.url is not None:
 6750            Writer.write_string(writer, 'url', obj.url)
 6751        if obj.username is not None:
 6752            Writer.write_string(writer, 'username', obj.username)
 6753        writer.write_end()
 6754
 6755    @staticmethod
 6756    def write_many(objs, writer, singular=None, plural=None):
 6757        if singular is None:
 6758            singular = 'open_stack_provider'
 6759        if plural is None:
 6760            plural = 'open_stack_providers'
 6761        writer.write_start(plural)
 6762        if type(objs) == List:
 6763            href = objs.href
 6764            if href is not None:
 6765                writer.write_attribute('href', href)
 6766        for obj in objs:
 6767            OpenStackProviderWriter.write_one(obj, writer, singular)
 6768        writer.write_end()
 6769
 6770
 6771class OpenStackSubnetWriter(Writer):
 6772
 6773    def __init__(self):
 6774        super(OpenStackSubnetWriter, self).__init__()
 6775
 6776    @staticmethod
 6777    def write_one(obj, writer, singular=None):
 6778        if singular is None:
 6779            singular = 'openstack_subnet'
 6780        writer.write_start(singular)
 6781        href = obj.href
 6782        if href is not None:
 6783            writer.write_attribute('href', href)
 6784        if obj.id is not None:
 6785            writer.write_attribute('id', obj.id)
 6786        if obj.cidr is not None:
 6787            Writer.write_string(writer, 'cidr', obj.cidr)
 6788        if obj.comment is not None:
 6789            Writer.write_string(writer, 'comment', obj.comment)
 6790        if obj.description is not None:
 6791            Writer.write_string(writer, 'description', obj.description)
 6792        if obj.dns_servers is not None:
 6793            writer.write_start('dns_servers')
 6794            for item in obj.dns_servers:
 6795                if item is not None:
 6796                    Writer.write_string(writer, 'dns_server', item)
 6797            writer.write_end()
 6798        if obj.gateway is not None:
 6799            Writer.write_string(writer, 'gateway', obj.gateway)
 6800        if obj.ip_version is not None:
 6801            Writer.write_string(writer, 'ip_version', obj.ip_version)
 6802        if obj.name is not None:
 6803            Writer.write_string(writer, 'name', obj.name)
 6804        if obj.openstack_network is not None:
 6805            OpenStackNetworkWriter.write_one(obj.openstack_network, writer, 'openstack_network')
 6806        writer.write_end()
 6807
 6808    @staticmethod
 6809    def write_many(objs, writer, singular=None, plural=None):
 6810        if singular is None:
 6811            singular = 'openstack_subnet'
 6812        if plural is None:
 6813            plural = 'openstack_subnets'
 6814        writer.write_start(plural)
 6815        if type(objs) == List:
 6816            href = objs.href
 6817            if href is not None:
 6818                writer.write_attribute('href', href)
 6819        for obj in objs:
 6820            OpenStackSubnetWriter.write_one(obj, writer, singular)
 6821        writer.write_end()
 6822
 6823
 6824class OpenStackVolumeProviderWriter(Writer):
 6825
 6826    def __init__(self):
 6827        super(OpenStackVolumeProviderWriter, self).__init__()
 6828
 6829    @staticmethod
 6830    def write_one(obj, writer, singular=None):
 6831        if singular is None:
 6832            singular = 'openstack_volume_provider'
 6833        writer.write_start(singular)
 6834        href = obj.href
 6835        if href is not None:
 6836            writer.write_attribute('href', href)
 6837        if obj.id is not None:
 6838            writer.write_attribute('id', obj.id)
 6839        if obj.authentication_url is not None:
 6840            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
 6841        if obj.comment is not None:
 6842            Writer.write_string(writer, 'comment', obj.comment)
 6843        if obj.description is not None:
 6844            Writer.write_string(writer, 'description', obj.description)
 6845        if obj.name is not None:
 6846            Writer.write_string(writer, 'name', obj.name)
 6847        if obj.password is not None:
 6848            Writer.write_string(writer, 'password', obj.password)
 6849        if obj.properties is not None:
 6850            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
 6851        if obj.requires_authentication is not None:
 6852            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
 6853        if obj.tenant_name is not None:
 6854            Writer.write_string(writer, 'tenant_name', obj.tenant_name)
 6855        if obj.url is not None:
 6856            Writer.write_string(writer, 'url', obj.url)
 6857        if obj.username is not None:
 6858            Writer.write_string(writer, 'username', obj.username)
 6859        if obj.authentication_keys is not None:
 6860            OpenstackVolumeAuthenticationKeyWriter.write_many(obj.authentication_keys, writer, 'openstack_volume_authentication_key', 'authentication_keys')
 6861        if obj.certificates is not None:
 6862            CertificateWriter.write_many(obj.certificates, writer, 'certificate', 'certificates')
 6863        if obj.data_center is not None:
 6864            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
 6865        if obj.volume_types is not None:
 6866            OpenStackVolumeTypeWriter.write_many(obj.volume_types, writer, 'open_stack_volume_type', 'volume_types')
 6867        writer.write_end()
 6868
 6869    @staticmethod
 6870    def write_many(objs, writer, singular=None, plural=None):
 6871        if singular is None:
 6872            singular = 'openstack_volume_provider'
 6873        if plural is None:
 6874            plural = 'openstack_volume_providers'
 6875        writer.write_start(plural)
 6876        if type(objs) == List:
 6877            href = objs.href
 6878            if href is not None:
 6879                writer.write_attribute('href', href)
 6880        for obj in objs:
 6881            OpenStackVolumeProviderWriter.write_one(obj, writer, singular)
 6882        writer.write_end()
 6883
 6884
 6885class OpenStackVolumeTypeWriter(Writer):
 6886
 6887    def __init__(self):
 6888        super(OpenStackVolumeTypeWriter, self).__init__()
 6889
 6890    @staticmethod
 6891    def write_one(obj, writer, singular=None):
 6892        if singular is None:
 6893            singular = 'open_stack_volume_type'
 6894        writer.write_start(singular)
 6895        href = obj.href
 6896        if href is not None:
 6897            writer.write_attribute('href', href)
 6898        if obj.id is not None:
 6899            writer.write_attribute('id', obj.id)
 6900        if obj.comment is not None:
 6901            Writer.write_string(writer, 'comment', obj.comment)
 6902        if obj.description is not None:
 6903            Writer.write_string(writer, 'description', obj.description)
 6904        if obj.name is not None:
 6905            Writer.write_string(writer, 'name', obj.name)
 6906        if obj.properties is not None:
 6907            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
 6908        if obj.openstack_volume_provider is not None:
 6909            OpenStackVolumeProviderWriter.write_one(obj.openstack_volume_provider, writer, 'openstack_volume_provider')
 6910        writer.write_end()
 6911
 6912    @staticmethod
 6913    def write_many(objs, writer, singular=None, plural=None):
 6914        if singular is None:
 6915            singular = 'open_stack_volume_type'
 6916        if plural is None:
 6917            plural = 'open_stack_volume_types'
 6918        writer.write_start(plural)
 6919        if type(objs) == List:
 6920            href = objs.href
 6921            if href is not None:
 6922                writer.write_attribute('href', href)
 6923        for obj in objs:
 6924            OpenStackVolumeTypeWriter.write_one(obj, writer, singular)
 6925        writer.write_end()
 6926
 6927
 6928class OpenstackVolumeAuthenticationKeyWriter(Writer):
 6929
 6930    def __init__(self):
 6931        super(OpenstackVolumeAuthenticationKeyWriter, self).__init__()
 6932
 6933    @staticmethod
 6934    def write_one(obj, writer, singular=None):
 6935        if singular is None:
 6936            singular = 'openstack_volume_authentication_key'
 6937        writer.write_start(singular)
 6938        href = obj.href
 6939        if href is not None:
 6940            writer.write_attribute('href', href)
 6941        if obj.id is not None:
 6942            writer.write_attribute('id', obj.id)
 6943        if obj.comment is not None:
 6944            Writer.write_string(writer, 'comment', obj.comment)
 6945        if obj.creation_date is not None:
 6946            Writer.write_date(writer, 'creation_date', obj.creation_date)
 6947        if obj.description is not None:
 6948            Writer.write_string(writer, 'description', obj.description)
 6949        if obj.name is not None:
 6950            Writer.write_string(writer, 'name', obj.name)
 6951        if obj.usage_type is not None:
 6952            Writer.write_string(writer, 'usage_type', obj.usage_type.value)
 6953        if obj.uuid is not None:
 6954            Writer.write_string(writer, 'uuid', obj.uuid)
 6955        if obj.value is not None:
 6956            Writer.write_string(writer, 'value', obj.value)
 6957        if obj.openstack_volume_provider is not None:
 6958            OpenStackVolumeProviderWriter.write_one(obj.openstack_volume_provider, writer, 'openstack_volume_provider')
 6959        writer.write_end()
 6960
 6961    @staticmethod
 6962    def write_many(objs, writer, singular=None, plural=None):
 6963        if singular is None:
 6964            singular = 'openstack_volume_authentication_key'
 6965        if plural is None:
 6966            plural = 'openstack_volume_authentication_keys'
 6967        writer.write_start(plural)
 6968        if type(objs) == List:
 6969            href = objs.href
 6970            if href is not None:
 6971                writer.write_attribute('href', href)
 6972        for obj in objs:
 6973            OpenstackVolumeAuthenticationKeyWriter.write_one(obj, writer, singular)
 6974        writer.write_end()
 6975
 6976
 6977class OperatingSystemWriter(Writer):
 6978
 6979    def __init__(self):
 6980        super(OperatingSystemWriter, self).__init__()
 6981
 6982    @staticmethod
 6983    def write_one(obj, writer, singular=None):
 6984        if singular is None:
 6985            singular = 'os'
 6986        writer.write_start(singular)
 6987        href = obj.href
 6988        if href is not None:
 6989            writer.write_attribute('href', href)
 6990        if obj.boot is not None:
 6991            BootWriter.write_one(obj.boot, writer, 'boot')
 6992        if obj.cmdline is not None:
 6993            Writer.write_string(writer, 'cmdline', obj.cmdline)
 6994        if obj.custom_kernel_cmdline is not None:
 6995            Writer.write_string(writer, 'custom_kernel_cmdline', obj.custom_kernel_cmdline)
 6996        if obj.initrd is not None:
 6997            Writer.write_string(writer, 'initrd', obj.initrd)
 6998        if obj.kernel is not None:
 6999            Writer.write_string(writer, 'kernel', obj.kernel)
 7000        if obj.reported_kernel_cmdline is not None:
 7001            Writer.write_string(writer, 'reported_kernel_cmdline', obj.reported_kernel_cmdline)
 7002        if obj.type is not None:
 7003            Writer.write_string(writer, 'type', obj.type)
 7004        if obj.version is not None:
 7005            VersionWriter.write_one(obj.version, writer, 'version')
 7006        writer.write_end()
 7007
 7008    @staticmethod
 7009    def write_many(objs, writer, singular=None, plural=None):
 7010        if singular is None:
 7011            singular = 'os'
 7012        if plural is None:
 7013            plural = 'oss'
 7014        writer.write_start(plural)
 7015        if type(objs) == List:
 7016            href = objs.href
 7017            if href is not None:
 7018                writer.write_attribute('href', href)
 7019        for obj in objs:
 7020            OperatingSystemWriter.write_one(obj, writer, singular)
 7021        writer.write_end()
 7022
 7023
 7024class OperatingSystemInfoWriter(Writer):
 7025
 7026    def __init__(self):
 7027        super(OperatingSystemInfoWriter, self).__init__()
 7028
 7029    @staticmethod
 7030    def write_one(obj, writer, singular=None):
 7031        if singular is None:
 7032            singular = 'operating_system'
 7033        writer.write_start(singular)
 7034        href = obj.href
 7035        if href is not None:
 7036            writer.write_attribute('href', href)
 7037        if obj.id is not None:
 7038            writer.write_attribute('id', obj.id)
 7039        if obj.architecture is not None:
 7040            Writer.write_string(writer, 'architecture', obj.architecture.value)
 7041        if obj.comment is not None:
 7042            Writer.write_string(writer, 'comment', obj.comment)
 7043        if obj.description is not None:
 7044            Writer.write_string(writer, 'description', obj.description)
 7045        if obj.large_icon is not None:
 7046            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
 7047        if obj.name is not None:
 7048            Writer.write_string(writer, 'name', obj.name)
 7049        if obj.small_icon is not None:
 7050            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
 7051        if obj.tpm_support is not None:
 7052            Writer.write_string(writer, 'tpm_support', obj.tpm_support.value)
 7053        writer.write_end()
 7054
 7055    @staticmethod
 7056    def write_many(objs, writer, singular=None, plural=None):
 7057        if singular is None:
 7058            singular = 'operating_system'
 7059        if plural is None:
 7060            plural = 'operation_systems'
 7061        writer.write_start(plural)
 7062        if type(objs) == List:
 7063            href = objs.href
 7064            if href is not None:
 7065                writer.write_attribute('href', href)
 7066        for obj in objs:
 7067            OperatingSystemInfoWriter.write_one(obj, writer, singular)
 7068        writer.write_end()
 7069
 7070
 7071class OptionWriter(Writer):
 7072
 7073    def __init__(self):
 7074        super(OptionWriter, self).__init__()
 7075
 7076    @staticmethod
 7077    def write_one(obj, writer, singular=None):
 7078        if singular is None:
 7079            singular = 'option'
 7080        writer.write_start(singular)
 7081        href = obj.href
 7082        if href is not None:
 7083            writer.write_attribute('href', href)
 7084        if obj.name is not None:
 7085            Writer.write_string(writer, 'name', obj.name)
 7086        if obj.type is not None:
 7087            Writer.write_string(writer, 'type', obj.type)
 7088        if obj.value is not None:
 7089            Writer.write_string(writer, 'value', obj.value)
 7090        writer.write_end()
 7091
 7092    @staticmethod
 7093    def write_many(objs, writer, singular=None, plural=None):
 7094        if singular is None:
 7095            singular = 'option'
 7096        if plural is None:
 7097            plural = 'options'
 7098        writer.write_start(plural)
 7099        if type(objs) == List:
 7100            href = objs.href
 7101            if href is not None:
 7102                writer.write_attribute('href', href)
 7103        for obj in objs:
 7104            OptionWriter.write_one(obj, writer, singular)
 7105        writer.write_end()
 7106
 7107
 7108class PackageWriter(Writer):
 7109
 7110    def __init__(self):
 7111        super(PackageWriter, self).__init__()
 7112
 7113    @staticmethod
 7114    def write_one(obj, writer, singular=None):
 7115        if singular is None:
 7116            singular = 'package'
 7117        writer.write_start(singular)
 7118        href = obj.href
 7119        if href is not None:
 7120            writer.write_attribute('href', href)
 7121        if obj.name is not None:
 7122            Writer.write_string(writer, 'name', obj.name)
 7123        writer.write_end()
 7124
 7125    @staticmethod
 7126    def write_many(objs, writer, singular=None, plural=None):
 7127        if singular is None:
 7128            singular = 'package'
 7129        if plural is None:
 7130            plural = 'packages'
 7131        writer.write_start(plural)
 7132        if type(objs) == List:
 7133            href = objs.href
 7134            if href is not None:
 7135                writer.write_attribute('href', href)
 7136        for obj in objs:
 7137            PackageWriter.write_one(obj, writer, singular)
 7138        writer.write_end()
 7139
 7140
 7141class PayloadWriter(Writer):
 7142
 7143    def __init__(self):
 7144        super(PayloadWriter, self).__init__()
 7145
 7146    @staticmethod
 7147    def write_one(obj, writer, singular=None):
 7148        if singular is None:
 7149            singular = 'payload'
 7150        writer.write_start(singular)
 7151        href = obj.href
 7152        if href is not None:
 7153            writer.write_attribute('href', href)
 7154        if obj.files is not None:
 7155            FileWriter.write_many(obj.files, writer, 'file', 'files')
 7156        if obj.type is not None:
 7157            Writer.write_string(writer, 'type', obj.type.value)
 7158        if obj.volume_id is not None:
 7159            Writer.write_string(writer, 'volume_id', obj.volume_id)
 7160        writer.write_end()
 7161
 7162    @staticmethod
 7163    def write_many(objs, writer, singular=None, plural=None):
 7164        if singular is None:
 7165            singular = 'payload'
 7166        if plural is None:
 7167            plural = 'payloads'
 7168        writer.write_start(plural)
 7169        if type(objs) == List:
 7170            href = objs.href
 7171            if href is not None:
 7172                writer.write_attribute('href', href)
 7173        for obj in objs:
 7174            PayloadWriter.write_one(obj, writer, singular)
 7175        writer.write_end()
 7176
 7177
 7178class PermissionWriter(Writer):
 7179
 7180    def __init__(self):
 7181        super(PermissionWriter, self).__init__()
 7182
 7183    @staticmethod
 7184    def write_one(obj, writer, singular=None):
 7185        if singular is None:
 7186            singular = 'permission'
 7187        writer.write_start(singular)
 7188        href = obj.href
 7189        if href is not None:
 7190            writer.write_attribute('href', href)
 7191        if obj.id is not None:
 7192            writer.write_attribute('id', obj.id)
 7193        if obj.comment is not None:
 7194            Writer.write_string(writer, 'comment', obj.comment)
 7195        if obj.description is not None:
 7196            Writer.write_string(writer, 'description', obj.description)
 7197        if obj.name is not None:
 7198            Writer.write_string(writer, 'name', obj.name)
 7199        if obj.cluster is not None:
 7200            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
 7201        if obj.data_center is not None:
 7202            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
 7203        if obj.disk is not None:
 7204            DiskWriter.write_one(obj.disk, writer, 'disk')
 7205        if obj.group is not None:
 7206            GroupWriter.write_one(obj.group, writer, 'group')
 7207        if obj.host is not None:
 7208            HostWriter.write_one(obj.host, writer, 'host')
 7209        if obj.role is not None:
 7210            RoleWriter.write_one(obj.role, writer, 'role')
 7211        if obj.storage_domain is not None:
 7212            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
 7213        if obj.template is not None:
 7214            TemplateWriter.write_one(obj.template, writer, 'template')
 7215        if obj.user is not None:
 7216            UserWriter.write_one(obj.user, writer, 'user')
 7217        if obj.vm is not None:
 7218            VmWriter.write_one(obj.vm, writer, 'vm')
 7219        if obj.vm_pool is not None:
 7220            VmPoolWriter.write_one(obj.vm_pool, writer, 'vm_pool')
 7221        writer.write_end()
 7222
 7223    @staticmethod
 7224    def write_many(objs, writer, singular=None, plural=None):
 7225        if singular is None:
 7226            singular = 'permission'
 7227        if plural is None:
 7228            plural = 'permissions'
 7229        writer.write_start(plural)
 7230        if type(objs) == List:
 7231            href = objs.href
 7232            if href is not None:
 7233                writer.write_attribute('href', href)
 7234        for obj in objs:
 7235            PermissionWriter.write_one(obj, writer, singular)
 7236        writer.write_end()
 7237
 7238
 7239class PermitWriter(Writer):
 7240
 7241    def __init__(self):
 7242        super(PermitWriter, self).__init__()
 7243
 7244    @staticmethod
 7245    def write_one(obj, writer, singular=None):
 7246        if singular is None:
 7247            singular = 'permit'
 7248        writer.write_start(singular)
 7249        href = obj.href
 7250        if href is not None:
 7251            writer.write_attribute('href', href)
 7252        if obj.id is not None:
 7253            writer.write_attribute('id', obj.id)
 7254        if obj.administrative is not None:
 7255            Writer.write_boolean(writer, 'administrative', obj.administrative)
 7256        if obj.comment is not None:
 7257            Writer.write_string(writer, 'comment', obj.comment)
 7258        if obj.description is not None:
 7259            Writer.write_string(writer, 'description', obj.description)
 7260        if obj.name is not None:
 7261            Writer.write_string(writer, 'name', obj.name)
 7262        if obj.role is not None:
 7263            RoleWriter.write_one(obj.role, writer, 'role')
 7264        writer.write_end()
 7265
 7266    @staticmethod
 7267    def write_many(objs, writer, singular=None, plural=None):
 7268        if singular is None:
 7269            singular = 'permit'
 7270        if plural is None:
 7271            plural = 'permits'
 7272        writer.write_start(plural)
 7273        if type(objs) == List:
 7274            href = objs.href
 7275            if href is not None:
 7276                writer.write_attribute('href', href)
 7277        for obj in objs:
 7278            PermitWriter.write_one(obj, writer, singular)
 7279        writer.write_end()
 7280
 7281
 7282class PmProxyWriter(Writer):
 7283
 7284    def __init__(self):
 7285        super(PmProxyWriter, self).__init__()
 7286
 7287    @staticmethod
 7288    def write_one(obj, writer, singular=None):
 7289        if singular is None:
 7290            singular = 'pm_proxy'
 7291        writer.write_start(singular)
 7292        href = obj.href
 7293        if href is not None:
 7294            writer.write_attribute('href', href)
 7295        if obj.type is not None:
 7296            Writer.write_string(writer, 'type', obj.type.value)
 7297        writer.write_end()
 7298
 7299    @staticmethod
 7300    def write_many(objs, writer, singular=None, plural=None):
 7301        if singular is None:
 7302            singular = 'pm_proxy'
 7303        if plural is None:
 7304            plural = 'pm_proxies'
 7305        writer.write_start(plural)
 7306        if type(objs) == List:
 7307            href = objs.href
 7308            if href is not None:
 7309                writer.write_attribute('href', href)
 7310        for obj in objs:
 7311            PmProxyWriter.write_one(obj, writer, singular)
 7312        writer.write_end()
 7313
 7314
 7315class PortMirroringWriter(Writer):
 7316
 7317    def __init__(self):
 7318        super(PortMirroringWriter, self).__init__()
 7319
 7320    @staticmethod
 7321    def write_one(obj, writer, singular=None):
 7322        if singular is None:
 7323            singular = 'port_mirroring'
 7324        writer.write_start(singular)
 7325        href = obj.href
 7326        if href is not None:
 7327            writer.write_attribute('href', href)
 7328        writer.write_end()
 7329
 7330    @staticmethod
 7331    def write_many(objs, writer, singular=None, plural=None):
 7332        if singular is None:
 7333            singular = 'port_mirroring'
 7334        if plural is None:
 7335            plural = 'port_mirrorings'
 7336        writer.write_start(plural)
 7337        if type(objs) == List:
 7338            href = objs.href
 7339            if href is not None:
 7340                writer.write_attribute('href', href)
 7341        for obj in objs:
 7342            PortMirroringWriter.write_one(obj, writer, singular)
 7343        writer.write_end()
 7344
 7345
 7346class PowerManagementWriter(Writer):
 7347
 7348    def __init__(self):
 7349        super(PowerManagementWriter, self).__init__()
 7350
 7351    @staticmethod
 7352    def write_one(obj, writer, singular=None):
 7353        if singular is None:
 7354            singular = 'power_management'
 7355        writer.write_start(singular)
 7356        href = obj.href
 7357        if href is not None:
 7358            writer.write_attribute('href', href)
 7359        if obj.address is not None:
 7360            Writer.write_string(writer, 'address', obj.address)
 7361        if obj.agents is not None:
 7362            AgentWriter.write_many(obj.agents, writer, 'agent', 'agents')
 7363        if obj.automatic_pm_enabled is not None:
 7364            Writer.write_boolean(writer, 'automatic_pm_enabled', obj.automatic_pm_enabled)
 7365        if obj.enabled is not None:
 7366            Writer.write_boolean(writer, 'enabled', obj.enabled)
 7367        if obj.kdump_detection is not None:
 7368            Writer.write_boolean(writer, 'kdump_detection', obj.kdump_detection)
 7369        if obj.options is not None:
 7370            OptionWriter.write_many(obj.options, writer, 'option', 'options')
 7371        if obj.password is not None:
 7372            Writer.write_string(writer, 'password', obj.password)
 7373        if obj.pm_proxies is not None:
 7374            PmProxyWriter.write_many(obj.pm_proxies, writer, 'pm_proxy', 'pm_proxies')
 7375        if obj.status is not None:
 7376            Writer.write_string(writer, 'status', obj.status.value)
 7377        if obj.type is not None:
 7378            Writer.write_string(writer, 'type', obj.type)
 7379        if obj.username is not None:
 7380            Writer.write_string(writer, 'username', obj.username)
 7381        writer.write_end()
 7382
 7383    @staticmethod
 7384    def write_many(objs, writer, singular=None, plural=None):
 7385        if singular is None:
 7386            singular = 'power_management'
 7387        if plural is None:
 7388            plural = 'power_managements'
 7389        writer.write_start(plural)
 7390        if type(objs) == List:
 7391            href = objs.href
 7392            if href is not None:
 7393                writer.write_attribute('href', href)
 7394        for obj in objs:
 7395            PowerManagementWriter.write_one(obj, writer, singular)
 7396        writer.write_end()
 7397
 7398
 7399class ProductWriter(Writer):
 7400
 7401    def __init__(self):
 7402        super(ProductWriter, self).__init__()
 7403
 7404    @staticmethod
 7405    def write_one(obj, writer, singular=None):
 7406        if singular is None:
 7407            singular = 'product'
 7408        writer.write_start(singular)
 7409        href = obj.href
 7410        if href is not None:
 7411            writer.write_attribute('href', href)
 7412        if obj.id is not None:
 7413            writer.write_attribute('id', obj.id)
 7414        if obj.comment is not None:
 7415            Writer.write_string(writer, 'comment', obj.comment)
 7416        if obj.description is not None:
 7417            Writer.write_string(writer, 'description', obj.description)
 7418        if obj.name is not None:
 7419            Writer.write_string(writer, 'name', obj.name)
 7420        writer.write_end()
 7421
 7422    @staticmethod
 7423    def write_many(objs, writer, singular=None, plural=None):
 7424        if singular is None:
 7425            singular = 'product'
 7426        if plural is None:
 7427            plural = 'products'
 7428        writer.write_start(plural)
 7429        if type(objs) == List:
 7430            href = objs.href
 7431            if href is not None:
 7432                writer.write_attribute('href', href)
 7433        for obj in objs:
 7434            ProductWriter.write_one(obj, writer, singular)
 7435        writer.write_end()
 7436
 7437
 7438class ProductInfoWriter(Writer):
 7439
 7440    def __init__(self):
 7441        super(ProductInfoWriter, self).__init__()
 7442
 7443    @staticmethod
 7444    def write_one(obj, writer, singular=None):
 7445        if singular is None:
 7446            singular = 'product_info'
 7447        writer.write_start(singular)
 7448        href = obj.href
 7449        if href is not None:
 7450            writer.write_attribute('href', href)
 7451        if obj.instance_id is not None:
 7452            Writer.write_string(writer, 'instance_id', obj.instance_id)
 7453        if obj.name is not None:
 7454            Writer.write_string(writer, 'name', obj.name)
 7455        if obj.vendor is not None:
 7456            Writer.write_string(writer, 'vendor', obj.vendor)
 7457        if obj.version is not None:
 7458            VersionWriter.write_one(obj.version, writer, 'version')
 7459        writer.write_end()
 7460
 7461    @staticmethod
 7462    def write_many(objs, writer, singular=None, plural=None):
 7463        if singular is None:
 7464            singular = 'product_info'
 7465        if plural is None:
 7466            plural = 'product_infos'
 7467        writer.write_start(plural)
 7468        if type(objs) == List:
 7469            href = objs.href
 7470            if href is not None:
 7471                writer.write_attribute('href', href)
 7472        for obj in objs:
 7473            ProductInfoWriter.write_one(obj, writer, singular)
 7474        writer.write_end()
 7475
 7476
 7477class ProfileDetailWriter(Writer):
 7478
 7479    def __init__(self):
 7480        super(ProfileDetailWriter, self).__init__()
 7481
 7482    @staticmethod
 7483    def write_one(obj, writer, singular=None):
 7484        if singular is None:
 7485            singular = 'profile_detail'
 7486        writer.write_start(singular)
 7487        href = obj.href
 7488        if href is not None:
 7489            writer.write_attribute('href', href)
 7490        if obj.block_statistics is not None:
 7491            BlockStatisticWriter.write_many(obj.block_statistics, writer, 'block_statistic', 'block_statistics')
 7492        if obj.duration is not None:
 7493            Writer.write_integer(writer, 'duration', obj.duration)
 7494        if obj.fop_statistics is not None:
 7495            FopStatisticWriter.write_many(obj.fop_statistics, writer, 'fop_statistic', 'fop_statistics')
 7496        if obj.profile_type is not None:
 7497            Writer.write_string(writer, 'profile_type', obj.profile_type)
 7498        if obj.statistics is not None:
 7499            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
 7500        writer.write_end()
 7501
 7502    @staticmethod
 7503    def write_many(objs, writer, singular=None, plural=None):
 7504        if singular is None:
 7505            singular = 'profile_detail'
 7506        if plural is None:
 7507            plural = 'profile_details'
 7508        writer.write_start(plural)
 7509        if type(objs) == List:
 7510            href = objs.href
 7511            if href is not None:
 7512                writer.write_attribute('href', href)
 7513        for obj in objs:
 7514            ProfileDetailWriter.write_one(obj, writer, singular)
 7515        writer.write_end()
 7516
 7517
 7518class PropertyWriter(Writer):
 7519
 7520    def __init__(self):
 7521        super(PropertyWriter, self).__init__()
 7522
 7523    @staticmethod
 7524    def write_one(obj, writer, singular=None):
 7525        if singular is None:
 7526            singular = 'property'
 7527        writer.write_start(singular)
 7528        href = obj.href
 7529        if href is not None:
 7530            writer.write_attribute('href', href)
 7531        if obj.name is not None:
 7532            Writer.write_string(writer, 'name', obj.name)
 7533        if obj.value is not None:
 7534            Writer.write_string(writer, 'value', obj.value)
 7535        writer.write_end()
 7536
 7537    @staticmethod
 7538    def write_many(objs, writer, singular=None, plural=None):
 7539        if singular is None:
 7540            singular = 'property'
 7541        if plural is None:
 7542            plural = 'properties'
 7543        writer.write_start(plural)
 7544        if type(objs) == List:
 7545            href = objs.href
 7546            if href is not None:
 7547                writer.write_attribute('href', href)
 7548        for obj in objs:
 7549            PropertyWriter.write_one(obj, writer, singular)
 7550        writer.write_end()
 7551
 7552
 7553class ProxyTicketWriter(Writer):
 7554
 7555    def __init__(self):
 7556        super(ProxyTicketWriter, self).__init__()
 7557
 7558    @staticmethod
 7559    def write_one(obj, writer, singular=None):
 7560        if singular is None:
 7561            singular = 'proxy_ticket'
 7562        writer.write_start(singular)
 7563        href = obj.href
 7564        if href is not None:
 7565            writer.write_attribute('href', href)
 7566        if obj.value is not None:
 7567            Writer.write_string(writer, 'value', obj.value)
 7568        writer.write_end()
 7569
 7570    @staticmethod
 7571    def write_many(objs, writer, singular=None, plural=None):
 7572        if singular is None:
 7573            singular = 'proxy_ticket'
 7574        if plural is None:
 7575            plural = 'proxy_tickets'
 7576        writer.write_start(plural)
 7577        if type(objs) == List:
 7578            href = objs.href
 7579            if href is not None:
 7580                writer.write_attribute('href', href)
 7581        for obj in objs:
 7582            ProxyTicketWriter.write_one(obj, writer, singular)
 7583        writer.write_end()
 7584
 7585
 7586class QosWriter(Writer):
 7587
 7588    def __init__(self):
 7589        super(QosWriter, self).__init__()
 7590
 7591    @staticmethod
 7592    def write_one(obj, writer, singular=None):
 7593        if singular is None:
 7594            singular = 'qos'
 7595        writer.write_start(singular)
 7596        href = obj.href
 7597        if href is not None:
 7598            writer.write_attribute('href', href)
 7599        if obj.id is not None:
 7600            writer.write_attribute('id', obj.id)
 7601        if obj.comment is not None:
 7602            Writer.write_string(writer, 'comment', obj.comment)
 7603        if obj.cpu_limit is not None:
 7604            Writer.write_integer(writer, 'cpu_limit', obj.cpu_limit)
 7605        if obj.description is not None:
 7606            Writer.write_string(writer, 'description', obj.description)
 7607        if obj.inbound_average is not None:
 7608            Writer.write_integer(writer, 'inbound_average', obj.inbound_average)
 7609        if obj.inbound_burst is not None:
 7610            Writer.write_integer(writer, 'inbound_burst', obj.inbound_burst)
 7611        if obj.inbound_peak is not None:
 7612            Writer.write_integer(writer, 'inbound_peak', obj.inbound_peak)
 7613        if obj.max_iops is not None:
 7614            Writer.write_integer(writer, 'max_iops', obj.max_iops)
 7615        if obj.max_read_iops is not None:
 7616            Writer.write_integer(writer, 'max_read_iops', obj.max_read_iops)
 7617        if obj.max_read_throughput is not None:
 7618            Writer.write_integer(writer, 'max_read_throughput', obj.max_read_throughput)
 7619        if obj.max_throughput is not None:
 7620            Writer.write_integer(writer, 'max_throughput', obj.max_throughput)
 7621        if obj.max_write_iops is not None:
 7622            Writer.write_integer(writer, 'max_write_iops', obj.max_write_iops)
 7623        if obj.max_write_throughput is not None:
 7624            Writer.write_integer(writer, 'max_write_throughput', obj.max_write_throughput)
 7625        if obj.name is not None:
 7626            Writer.write_string(writer, 'name', obj.name)
 7627        if obj.outbound_average is not None:
 7628            Writer.write_integer(writer, 'outbound_average', obj.outbound_average)
 7629        if obj.outbound_average_linkshare is not None:
 7630            Writer.write_integer(writer, 'outbound_average_linkshare', obj.outbound_average_linkshare)
 7631        if obj.outbound_average_realtime is not None:
 7632            Writer.write_integer(writer, 'outbound_average_realtime', obj.outbound_average_realtime)
 7633        if obj.outbound_average_upperlimit is not None:
 7634            Writer.write_integer(writer, 'outbound_average_upperlimit', obj.outbound_average_upperlimit)
 7635        if obj.outbound_burst is not None:
 7636            Writer.write_integer(writer, 'outbound_burst', obj.outbound_burst)
 7637        if obj.outbound_peak is not None:
 7638            Writer.write_integer(writer, 'outbound_peak', obj.outbound_peak)
 7639        if obj.type is not None:
 7640            Writer.write_string(writer, 'type', obj.type.value)
 7641        if obj.data_center is not None:
 7642            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
 7643        writer.write_end()
 7644
 7645    @staticmethod
 7646    def write_many(objs, writer, singular=None, plural=None):
 7647        if singular is None:
 7648            singular = 'qos'
 7649        if plural is None:
 7650            plural = 'qoss'
 7651        writer.write_start(plural)
 7652        if type(objs) == List:
 7653            href = objs.href
 7654            if href is not None:
 7655                writer.write_attribute('href', href)
 7656        for obj in objs:
 7657            QosWriter.write_one(obj, writer, singular)
 7658        writer.write_end()
 7659
 7660
 7661class QuotaWriter(Writer):
 7662
 7663    def __init__(self):
 7664        super(QuotaWriter, self).__init__()
 7665
 7666    @staticmethod
 7667    def write_one(obj, writer, singular=None):
 7668        if singular is None:
 7669            singular = 'quota'
 7670        writer.write_start(singular)
 7671        href = obj.href
 7672        if href is not None:
 7673            writer.write_attribute('href', href)
 7674        if obj.id is not None:
 7675            writer.write_attribute('id', obj.id)
 7676        if obj.cluster_hard_limit_pct is not None:
 7677            Writer.write_integer(writer, 'cluster_hard_limit_pct', obj.cluster_hard_limit_pct)
 7678        if obj.cluster_soft_limit_pct is not None:
 7679            Writer.write_integer(writer, 'cluster_soft_limit_pct', obj.cluster_soft_limit_pct)
 7680        if obj.comment is not None:
 7681            Writer.write_string(writer, 'comment', obj.comment)
 7682        if obj.data_center is not None:
 7683            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
 7684        if obj.description is not None:
 7685            Writer.write_string(writer, 'description', obj.description)
 7686        if obj.disks is not None:
 7687            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
 7688        if obj.name is not None:
 7689            Writer.write_string(writer, 'name', obj.name)
 7690        if obj.storage_hard_limit_pct is not None:
 7691            Writer.write_integer(writer, 'storage_hard_limit_pct', obj.storage_hard_limit_pct)
 7692        if obj.storage_soft_limit_pct is not None:
 7693            Writer.write_integer(writer, 'storage_soft_limit_pct', obj.storage_soft_limit_pct)
 7694        if obj.users is not None:
 7695            UserWriter.write_many(obj.users, writer, 'user', 'users')
 7696        if obj.vms is not None:
 7697            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
 7698        if obj.permissions is not None:
 7699            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 7700        if obj.quota_cluster_limits is not None:
 7701            QuotaClusterLimitWriter.write_many(obj.quota_cluster_limits, writer, 'quota_cluster_limit', 'quota_cluster_limits')
 7702        if obj.quota_storage_limits is not None:
 7703            QuotaStorageLimitWriter.write_many(obj.quota_storage_limits, writer, 'quota_storage_limit', 'quota_storage_limits')
 7704        writer.write_end()
 7705
 7706    @staticmethod
 7707    def write_many(objs, writer, singular=None, plural=None):
 7708        if singular is None:
 7709            singular = 'quota'
 7710        if plural is None:
 7711            plural = 'quotas'
 7712        writer.write_start(plural)
 7713        if type(objs) == List:
 7714            href = objs.href
 7715            if href is not None:
 7716                writer.write_attribute('href', href)
 7717        for obj in objs:
 7718            QuotaWriter.write_one(obj, writer, singular)
 7719        writer.write_end()
 7720
 7721
 7722class QuotaClusterLimitWriter(Writer):
 7723
 7724    def __init__(self):
 7725        super(QuotaClusterLimitWriter, self).__init__()
 7726
 7727    @staticmethod
 7728    def write_one(obj, writer, singular=None):
 7729        if singular is None:
 7730            singular = 'quota_cluster_limit'
 7731        writer.write_start(singular)
 7732        href = obj.href
 7733        if href is not None:
 7734            writer.write_attribute('href', href)
 7735        if obj.id is not None:
 7736            writer.write_attribute('id', obj.id)
 7737        if obj.comment is not None:
 7738            Writer.write_string(writer, 'comment', obj.comment)
 7739        if obj.description is not None:
 7740            Writer.write_string(writer, 'description', obj.description)
 7741        if obj.memory_limit is not None:
 7742            Writer.write_decimal(writer, 'memory_limit', obj.memory_limit)
 7743        if obj.memory_usage is not None:
 7744            Writer.write_decimal(writer, 'memory_usage', obj.memory_usage)
 7745        if obj.name is not None:
 7746            Writer.write_string(writer, 'name', obj.name)
 7747        if obj.vcpu_limit is not None:
 7748            Writer.write_integer(writer, 'vcpu_limit', obj.vcpu_limit)
 7749        if obj.vcpu_usage is not None:
 7750            Writer.write_integer(writer, 'vcpu_usage', obj.vcpu_usage)
 7751        if obj.cluster is not None:
 7752            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
 7753        if obj.quota is not None:
 7754            QuotaWriter.write_one(obj.quota, writer, 'quota')
 7755        writer.write_end()
 7756
 7757    @staticmethod
 7758    def write_many(objs, writer, singular=None, plural=None):
 7759        if singular is None:
 7760            singular = 'quota_cluster_limit'
 7761        if plural is None:
 7762            plural = 'quota_cluster_limits'
 7763        writer.write_start(plural)
 7764        if type(objs) == List:
 7765            href = objs.href
 7766            if href is not None:
 7767                writer.write_attribute('href', href)
 7768        for obj in objs:
 7769            QuotaClusterLimitWriter.write_one(obj, writer, singular)
 7770        writer.write_end()
 7771
 7772
 7773class QuotaStorageLimitWriter(Writer):
 7774
 7775    def __init__(self):
 7776        super(QuotaStorageLimitWriter, self).__init__()
 7777
 7778    @staticmethod
 7779    def write_one(obj, writer, singular=None):
 7780        if singular is None:
 7781            singular = 'quota_storage_limit'
 7782        writer.write_start(singular)
 7783        href = obj.href
 7784        if href is not None:
 7785            writer.write_attribute('href', href)
 7786        if obj.id is not None:
 7787            writer.write_attribute('id', obj.id)
 7788        if obj.comment is not None:
 7789            Writer.write_string(writer, 'comment', obj.comment)
 7790        if obj.description is not None:
 7791            Writer.write_string(writer, 'description', obj.description)
 7792        if obj.limit is not None:
 7793            Writer.write_integer(writer, 'limit', obj.limit)
 7794        if obj.name is not None:
 7795            Writer.write_string(writer, 'name', obj.name)
 7796        if obj.usage is not None:
 7797            Writer.write_decimal(writer, 'usage', obj.usage)
 7798        if obj.quota is not None:
 7799            QuotaWriter.write_one(obj.quota, writer, 'quota')
 7800        if obj.storage_domain is not None:
 7801            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
 7802        writer.write_end()
 7803
 7804    @staticmethod
 7805    def write_many(objs, writer, singular=None, plural=None):
 7806        if singular is None:
 7807            singular = 'quota_storage_limit'
 7808        if plural is None:
 7809            plural = 'quota_storage_limits'
 7810        writer.write_start(plural)
 7811        if type(objs) == List:
 7812            href = objs.href
 7813            if href is not None:
 7814                writer.write_attribute('href', href)
 7815        for obj in objs:
 7816            QuotaStorageLimitWriter.write_one(obj, writer, singular)
 7817        writer.write_end()
 7818
 7819
 7820class RangeWriter(Writer):
 7821
 7822    def __init__(self):
 7823        super(RangeWriter, self).__init__()
 7824
 7825    @staticmethod
 7826    def write_one(obj, writer, singular=None):
 7827        if singular is None:
 7828            singular = 'range'
 7829        writer.write_start(singular)
 7830        href = obj.href
 7831        if href is not None:
 7832            writer.write_attribute('href', href)
 7833        if obj.from_ is not None:
 7834            Writer.write_string(writer, 'from', obj.from_)
 7835        if obj.to is not None:
 7836            Writer.write_string(writer, 'to', obj.to)
 7837        writer.write_end()
 7838
 7839    @staticmethod
 7840    def write_many(objs, writer, singular=None, plural=None):
 7841        if singular is None:
 7842            singular = 'range'
 7843        if plural is None:
 7844            plural = 'ranges'
 7845        writer.write_start(plural)
 7846        if type(objs) == List:
 7847            href = objs.href
 7848            if href is not None:
 7849                writer.write_attribute('href', href)
 7850        for obj in objs:
 7851            RangeWriter.write_one(obj, writer, singular)
 7852        writer.write_end()
 7853
 7854
 7855class RateWriter(Writer):
 7856
 7857    def __init__(self):
 7858        super(RateWriter, self).__init__()
 7859
 7860    @staticmethod
 7861    def write_one(obj, writer, singular=None):
 7862        if singular is None:
 7863            singular = 'rate'
 7864        writer.write_start(singular)
 7865        href = obj.href
 7866        if href is not None:
 7867            writer.write_attribute('href', href)
 7868        if obj.bytes is not None:
 7869            Writer.write_integer(writer, 'bytes', obj.bytes)
 7870        if obj.period is not None:
 7871            Writer.write_integer(writer, 'period', obj.period)
 7872        writer.write_end()
 7873
 7874    @staticmethod
 7875    def write_many(objs, writer, singular=None, plural=None):
 7876        if singular is None:
 7877            singular = 'rate'
 7878        if plural is None:
 7879            plural = 'rates'
 7880        writer.write_start(plural)
 7881        if type(objs) == List:
 7882            href = objs.href
 7883            if href is not None:
 7884                writer.write_attribute('href', href)
 7885        for obj in objs:
 7886            RateWriter.write_one(obj, writer, singular)
 7887        writer.write_end()
 7888
 7889
 7890class RegistrationAffinityGroupMappingWriter(Writer):
 7891
 7892    def __init__(self):
 7893        super(RegistrationAffinityGroupMappingWriter, self).__init__()
 7894
 7895    @staticmethod
 7896    def write_one(obj, writer, singular=None):
 7897        if singular is None:
 7898            singular = 'registration_affinity_group_mapping'
 7899        writer.write_start(singular)
 7900        href = obj.href
 7901        if href is not None:
 7902            writer.write_attribute('href', href)
 7903        if obj.from_ is not None:
 7904            AffinityGroupWriter.write_one(obj.from_, writer, 'from')
 7905        if obj.to is not None:
 7906            AffinityGroupWriter.write_one(obj.to, writer, 'to')
 7907        writer.write_end()
 7908
 7909    @staticmethod
 7910    def write_many(objs, writer, singular=None, plural=None):
 7911        if singular is None:
 7912            singular = 'registration_affinity_group_mapping'
 7913        if plural is None:
 7914            plural = 'registration_affinity_group_mappings'
 7915        writer.write_start(plural)
 7916        if type(objs) == List:
 7917            href = objs.href
 7918            if href is not None:
 7919                writer.write_attribute('href', href)
 7920        for obj in objs:
 7921            RegistrationAffinityGroupMappingWriter.write_one(obj, writer, singular)
 7922        writer.write_end()
 7923
 7924
 7925class RegistrationAffinityLabelMappingWriter(Writer):
 7926
 7927    def __init__(self):
 7928        super(RegistrationAffinityLabelMappingWriter, self).__init__()
 7929
 7930    @staticmethod
 7931    def write_one(obj, writer, singular=None):
 7932        if singular is None:
 7933            singular = 'registration_affinity_label_mapping'
 7934        writer.write_start(singular)
 7935        href = obj.href
 7936        if href is not None:
 7937            writer.write_attribute('href', href)
 7938        if obj.from_ is not None:
 7939            AffinityLabelWriter.write_one(obj.from_, writer, 'from')
 7940        if obj.to is not None:
 7941            AffinityLabelWriter.write_one(obj.to, writer, 'to')
 7942        writer.write_end()
 7943
 7944    @staticmethod
 7945    def write_many(objs, writer, singular=None, plural=None):
 7946        if singular is None:
 7947            singular = 'registration_affinity_label_mapping'
 7948        if plural is None:
 7949            plural = 'registration_affinity_label_mappings'
 7950        writer.write_start(plural)
 7951        if type(objs) == List:
 7952            href = objs.href
 7953            if href is not None:
 7954                writer.write_attribute('href', href)
 7955        for obj in objs:
 7956            RegistrationAffinityLabelMappingWriter.write_one(obj, writer, singular)
 7957        writer.write_end()
 7958
 7959
 7960class RegistrationClusterMappingWriter(Writer):
 7961
 7962    def __init__(self):
 7963        super(RegistrationClusterMappingWriter, self).__init__()
 7964
 7965    @staticmethod
 7966    def write_one(obj, writer, singular=None):
 7967        if singular is None:
 7968            singular = 'registration_cluster_mapping'
 7969        writer.write_start(singular)
 7970        href = obj.href
 7971        if href is not None:
 7972            writer.write_attribute('href', href)
 7973        if obj.from_ is not None:
 7974            ClusterWriter.write_one(obj.from_, writer, 'from')
 7975        if obj.to is not None:
 7976            ClusterWriter.write_one(obj.to, writer, 'to')
 7977        writer.write_end()
 7978
 7979    @staticmethod
 7980    def write_many(objs, writer, singular=None, plural=None):
 7981        if singular is None:
 7982            singular = 'registration_cluster_mapping'
 7983        if plural is None:
 7984            plural = 'registration_cluster_mappings'
 7985        writer.write_start(plural)
 7986        if type(objs) == List:
 7987            href = objs.href
 7988            if href is not None:
 7989                writer.write_attribute('href', href)
 7990        for obj in objs:
 7991            RegistrationClusterMappingWriter.write_one(obj, writer, singular)
 7992        writer.write_end()
 7993
 7994
 7995class RegistrationConfigurationWriter(Writer):
 7996
 7997    def __init__(self):
 7998        super(RegistrationConfigurationWriter, self).__init__()
 7999
 8000    @staticmethod
 8001    def write_one(obj, writer, singular=None):
 8002        if singular is None:
 8003            singular = 'registration_configuration'
 8004        writer.write_start(singular)
 8005        href = obj.href
 8006        if href is not None:
 8007            writer.write_attribute('href', href)
 8008        if obj.affinity_group_mappings is not None:
 8009            RegistrationAffinityGroupMappingWriter.write_many(obj.affinity_group_mappings, writer, 'registration_affinity_group_mapping', 'affinity_group_mappings')
 8010        if obj.affinity_label_mappings is not None:
 8011            RegistrationAffinityLabelMappingWriter.write_many(obj.affinity_label_mappings, writer, 'registration_affinity_label_mapping', 'affinity_label_mappings')
 8012        if obj.cluster_mappings is not None:
 8013            RegistrationClusterMappingWriter.write_many(obj.cluster_mappings, writer, 'registration_cluster_mapping', 'cluster_mappings')
 8014        if obj.domain_mappings is not None:
 8015            RegistrationDomainMappingWriter.write_many(obj.domain_mappings, writer, 'registration_domain_mapping', 'domain_mappings')
 8016        if obj.lun_mappings is not None:
 8017            RegistrationLunMappingWriter.write_many(obj.lun_mappings, writer, 'registration_lun_mapping', 'lun_mappings')
 8018        if obj.role_mappings is not None:
 8019            RegistrationRoleMappingWriter.write_many(obj.role_mappings, writer, 'registration_role_mapping', 'role_mappings')
 8020        if obj.vnic_profile_mappings is not None:
 8021            RegistrationVnicProfileMappingWriter.write_many(obj.vnic_profile_mappings, writer, 'registration_vnic_profile_mapping', 'vnic_profile_mappings')
 8022        writer.write_end()
 8023
 8024    @staticmethod
 8025    def write_many(objs, writer, singular=None, plural=None):
 8026        if singular is None:
 8027            singular = 'registration_configuration'
 8028        if plural is None:
 8029            plural = 'registration_configurations'
 8030        writer.write_start(plural)
 8031        if type(objs) == List:
 8032            href = objs.href
 8033            if href is not None:
 8034                writer.write_attribute('href', href)
 8035        for obj in objs:
 8036            RegistrationConfigurationWriter.write_one(obj, writer, singular)
 8037        writer.write_end()
 8038
 8039
 8040class RegistrationDomainMappingWriter(Writer):
 8041
 8042    def __init__(self):
 8043        super(RegistrationDomainMappingWriter, self).__init__()
 8044
 8045    @staticmethod
 8046    def write_one(obj, writer, singular=None):
 8047        if singular is None:
 8048            singular = 'registration_domain_mapping'
 8049        writer.write_start(singular)
 8050        href = obj.href
 8051        if href is not None:
 8052            writer.write_attribute('href', href)
 8053        if obj.from_ is not None:
 8054            DomainWriter.write_one(obj.from_, writer, 'from')
 8055        if obj.to is not None:
 8056            DomainWriter.write_one(obj.to, writer, 'to')
 8057        writer.write_end()
 8058
 8059    @staticmethod
 8060    def write_many(objs, writer, singular=None, plural=None):
 8061        if singular is None:
 8062            singular = 'registration_domain_mapping'
 8063        if plural is None:
 8064            plural = 'registration_domain_mappings'
 8065        writer.write_start(plural)
 8066        if type(objs) == List:
 8067            href = objs.href
 8068            if href is not None:
 8069                writer.write_attribute('href', href)
 8070        for obj in objs:
 8071            RegistrationDomainMappingWriter.write_one(obj, writer, singular)
 8072        writer.write_end()
 8073
 8074
 8075class RegistrationLunMappingWriter(Writer):
 8076
 8077    def __init__(self):
 8078        super(RegistrationLunMappingWriter, self).__init__()
 8079
 8080    @staticmethod
 8081    def write_one(obj, writer, singular=None):
 8082        if singular is None:
 8083            singular = 'registration_lun_mapping'
 8084        writer.write_start(singular)
 8085        href = obj.href
 8086        if href is not None:
 8087            writer.write_attribute('href', href)
 8088        if obj.from_ is not None:
 8089            DiskWriter.write_one(obj.from_, writer, 'from')
 8090        if obj.to is not None:
 8091            DiskWriter.write_one(obj.to, writer, 'to')
 8092        writer.write_end()
 8093
 8094    @staticmethod
 8095    def write_many(objs, writer, singular=None, plural=None):
 8096        if singular is None:
 8097            singular = 'registration_lun_mapping'
 8098        if plural is None:
 8099            plural = 'registration_lun_mappings'
 8100        writer.write_start(plural)
 8101        if type(objs) == List:
 8102            href = objs.href
 8103            if href is not None:
 8104                writer.write_attribute('href', href)
 8105        for obj in objs:
 8106            RegistrationLunMappingWriter.write_one(obj, writer, singular)
 8107        writer.write_end()
 8108
 8109
 8110class RegistrationRoleMappingWriter(Writer):
 8111
 8112    def __init__(self):
 8113        super(RegistrationRoleMappingWriter, self).__init__()
 8114
 8115    @staticmethod
 8116    def write_one(obj, writer, singular=None):
 8117        if singular is None:
 8118            singular = 'registration_role_mapping'
 8119        writer.write_start(singular)
 8120        href = obj.href
 8121        if href is not None:
 8122            writer.write_attribute('href', href)
 8123        if obj.from_ is not None:
 8124            RoleWriter.write_one(obj.from_, writer, 'from')
 8125        if obj.to is not None:
 8126            RoleWriter.write_one(obj.to, writer, 'to')
 8127        writer.write_end()
 8128
 8129    @staticmethod
 8130    def write_many(objs, writer, singular=None, plural=None):
 8131        if singular is None:
 8132            singular = 'registration_role_mapping'
 8133        if plural is None:
 8134            plural = 'registration_role_mappings'
 8135        writer.write_start(plural)
 8136        if type(objs) == List:
 8137            href = objs.href
 8138            if href is not None:
 8139                writer.write_attribute('href', href)
 8140        for obj in objs:
 8141            RegistrationRoleMappingWriter.write_one(obj, writer, singular)
 8142        writer.write_end()
 8143
 8144
 8145class RegistrationVnicProfileMappingWriter(Writer):
 8146
 8147    def __init__(self):
 8148        super(RegistrationVnicProfileMappingWriter, self).__init__()
 8149
 8150    @staticmethod
 8151    def write_one(obj, writer, singular=None):
 8152        if singular is None:
 8153            singular = 'registration_vnic_profile_mapping'
 8154        writer.write_start(singular)
 8155        href = obj.href
 8156        if href is not None:
 8157            writer.write_attribute('href', href)
 8158        if obj.from_ is not None:
 8159            VnicProfileWriter.write_one(obj.from_, writer, 'from')
 8160        if obj.to is not None:
 8161            VnicProfileWriter.write_one(obj.to, writer, 'to')
 8162        writer.write_end()
 8163
 8164    @staticmethod
 8165    def write_many(objs, writer, singular=None, plural=None):
 8166        if singular is None:
 8167            singular = 'registration_vnic_profile_mapping'
 8168        if plural is None:
 8169            plural = 'registration_vnic_profile_mappings'
 8170        writer.write_start(plural)
 8171        if type(objs) == List:
 8172            href = objs.href
 8173            if href is not None:
 8174                writer.write_attribute('href', href)
 8175        for obj in objs:
 8176            RegistrationVnicProfileMappingWriter.write_one(obj, writer, singular)
 8177        writer.write_end()
 8178
 8179
 8180class ReportedConfigurationWriter(Writer):
 8181
 8182    def __init__(self):
 8183        super(ReportedConfigurationWriter, self).__init__()
 8184
 8185    @staticmethod
 8186    def write_one(obj, writer, singular=None):
 8187        if singular is None:
 8188            singular = 'reported_configuration'
 8189        writer.write_start(singular)
 8190        href = obj.href
 8191        if href is not None:
 8192            writer.write_attribute('href', href)
 8193        if obj.actual_value is not None:
 8194            Writer.write_string(writer, 'actual_value', obj.actual_value)
 8195        if obj.expected_value is not None:
 8196            Writer.write_string(writer, 'expected_value', obj.expected_value)
 8197        if obj.in_sync is not None:
 8198            Writer.write_boolean(writer, 'in_sync', obj.in_sync)
 8199        if obj.name is not None:
 8200            Writer.write_string(writer, 'name', obj.name)
 8201        writer.write_end()
 8202
 8203    @staticmethod
 8204    def write_many(objs, writer, singular=None, plural=None):
 8205        if singular is None:
 8206            singular = 'reported_configuration'
 8207        if plural is None:
 8208            plural = 'reported_configurations'
 8209        writer.write_start(plural)
 8210        if type(objs) == List:
 8211            href = objs.href
 8212            if href is not None:
 8213                writer.write_attribute('href', href)
 8214        for obj in objs:
 8215            ReportedConfigurationWriter.write_one(obj, writer, singular)
 8216        writer.write_end()
 8217
 8218
 8219class ReportedDeviceWriter(Writer):
 8220
 8221    def __init__(self):
 8222        super(ReportedDeviceWriter, self).__init__()
 8223
 8224    @staticmethod
 8225    def write_one(obj, writer, singular=None):
 8226        if singular is None:
 8227            singular = 'reported_device'
 8228        writer.write_start(singular)
 8229        href = obj.href
 8230        if href is not None:
 8231            writer.write_attribute('href', href)
 8232        if obj.id is not None:
 8233            writer.write_attribute('id', obj.id)
 8234        if obj.comment is not None:
 8235            Writer.write_string(writer, 'comment', obj.comment)
 8236        if obj.description is not None:
 8237            Writer.write_string(writer, 'description', obj.description)
 8238        if obj.ips is not None:
 8239            IpWriter.write_many(obj.ips, writer, 'ip', 'ips')
 8240        if obj.mac is not None:
 8241            MacWriter.write_one(obj.mac, writer, 'mac')
 8242        if obj.name is not None:
 8243            Writer.write_string(writer, 'name', obj.name)
 8244        if obj.type is not None:
 8245            Writer.write_string(writer, 'type', obj.type.value)
 8246        if obj.vm is not None:
 8247            VmWriter.write_one(obj.vm, writer, 'vm')
 8248        writer.write_end()
 8249
 8250    @staticmethod
 8251    def write_many(objs, writer, singular=None, plural=None):
 8252        if singular is None:
 8253            singular = 'reported_device'
 8254        if plural is None:
 8255            plural = 'reported_devices'
 8256        writer.write_start(plural)
 8257        if type(objs) == List:
 8258            href = objs.href
 8259            if href is not None:
 8260                writer.write_attribute('href', href)
 8261        for obj in objs:
 8262            ReportedDeviceWriter.write_one(obj, writer, singular)
 8263        writer.write_end()
 8264
 8265
 8266class RngDeviceWriter(Writer):
 8267
 8268    def __init__(self):
 8269        super(RngDeviceWriter, self).__init__()
 8270
 8271    @staticmethod
 8272    def write_one(obj, writer, singular=None):
 8273        if singular is None:
 8274            singular = 'rng_device'
 8275        writer.write_start(singular)
 8276        href = obj.href
 8277        if href is not None:
 8278            writer.write_attribute('href', href)
 8279        if obj.rate is not None:
 8280            RateWriter.write_one(obj.rate, writer, 'rate')
 8281        if obj.source is not None:
 8282            Writer.write_string(writer, 'source', obj.source.value)
 8283        writer.write_end()
 8284
 8285    @staticmethod
 8286    def write_many(objs, writer, singular=None, plural=None):
 8287        if singular is None:
 8288            singular = 'rng_device'
 8289        if plural is None:
 8290            plural = 'rng_devices'
 8291        writer.write_start(plural)
 8292        if type(objs) == List:
 8293            href = objs.href
 8294            if href is not None:
 8295                writer.write_attribute('href', href)
 8296        for obj in objs:
 8297            RngDeviceWriter.write_one(obj, writer, singular)
 8298        writer.write_end()
 8299
 8300
 8301class RoleWriter(Writer):
 8302
 8303    def __init__(self):
 8304        super(RoleWriter, self).__init__()
 8305
 8306    @staticmethod
 8307    def write_one(obj, writer, singular=None):
 8308        if singular is None:
 8309            singular = 'role'
 8310        writer.write_start(singular)
 8311        href = obj.href
 8312        if href is not None:
 8313            writer.write_attribute('href', href)
 8314        if obj.id is not None:
 8315            writer.write_attribute('id', obj.id)
 8316        if obj.administrative is not None:
 8317            Writer.write_boolean(writer, 'administrative', obj.administrative)
 8318        if obj.comment is not None:
 8319            Writer.write_string(writer, 'comment', obj.comment)
 8320        if obj.description is not None:
 8321            Writer.write_string(writer, 'description', obj.description)
 8322        if obj.mutable is not None:
 8323            Writer.write_boolean(writer, 'mutable', obj.mutable)
 8324        if obj.name is not None:
 8325            Writer.write_string(writer, 'name', obj.name)
 8326        if obj.permits is not None:
 8327            PermitWriter.write_many(obj.permits, writer, 'permit', 'permits')
 8328        if obj.user is not None:
 8329            UserWriter.write_one(obj.user, writer, 'user')
 8330        writer.write_end()
 8331
 8332    @staticmethod
 8333    def write_many(objs, writer, singular=None, plural=None):
 8334        if singular is None:
 8335            singular = 'role'
 8336        if plural is None:
 8337            plural = 'roles'
 8338        writer.write_start(plural)
 8339        if type(objs) == List:
 8340            href = objs.href
 8341            if href is not None:
 8342                writer.write_attribute('href', href)
 8343        for obj in objs:
 8344            RoleWriter.write_one(obj, writer, singular)
 8345        writer.write_end()
 8346
 8347
 8348class SchedulingPolicyWriter(Writer):
 8349
 8350    def __init__(self):
 8351        super(SchedulingPolicyWriter, self).__init__()
 8352
 8353    @staticmethod
 8354    def write_one(obj, writer, singular=None):
 8355        if singular is None:
 8356            singular = 'scheduling_policy'
 8357        writer.write_start(singular)
 8358        href = obj.href
 8359        if href is not None:
 8360            writer.write_attribute('href', href)
 8361        if obj.id is not None:
 8362            writer.write_attribute('id', obj.id)
 8363        if obj.comment is not None:
 8364            Writer.write_string(writer, 'comment', obj.comment)
 8365        if obj.default_policy is not None:
 8366            Writer.write_boolean(writer, 'default_policy', obj.default_policy)
 8367        if obj.description is not None:
 8368            Writer.write_string(writer, 'description', obj.description)
 8369        if obj.locked is not None:
 8370            Writer.write_boolean(writer, 'locked', obj.locked)
 8371        if obj.name is not None:
 8372            Writer.write_string(writer, 'name', obj.name)
 8373        if obj.properties is not None:
 8374            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
 8375        if obj.balances is not None:
 8376            BalanceWriter.write_many(obj.balances, writer, 'balance', 'balances')
 8377        if obj.filters is not None:
 8378            FilterWriter.write_many(obj.filters, writer, 'filter', 'filters')
 8379        if obj.weight is not None:
 8380            WeightWriter.write_many(obj.weight, writer, 'weight', 'weight')
 8381        writer.write_end()
 8382
 8383    @staticmethod
 8384    def write_many(objs, writer, singular=None, plural=None):
 8385        if singular is None:
 8386            singular = 'scheduling_policy'
 8387        if plural is None:
 8388            plural = 'scheduling_policies'
 8389        writer.write_start(plural)
 8390        if type(objs) == List:
 8391            href = objs.href
 8392            if href is not None:
 8393                writer.write_attribute('href', href)
 8394        for obj in objs:
 8395            SchedulingPolicyWriter.write_one(obj, writer, singular)
 8396        writer.write_end()
 8397
 8398
 8399class SchedulingPolicyUnitWriter(Writer):
 8400
 8401    def __init__(self):
 8402        super(SchedulingPolicyUnitWriter, self).__init__()
 8403
 8404    @staticmethod
 8405    def write_one(obj, writer, singular=None):
 8406        if singular is None:
 8407            singular = 'scheduling_policy_unit'
 8408        writer.write_start(singular)
 8409        href = obj.href
 8410        if href is not None:
 8411            writer.write_attribute('href', href)
 8412        if obj.id is not None:
 8413            writer.write_attribute('id', obj.id)
 8414        if obj.comment is not None:
 8415            Writer.write_string(writer, 'comment', obj.comment)
 8416        if obj.description is not None:
 8417            Writer.write_string(writer, 'description', obj.description)
 8418        if obj.enabled is not None:
 8419            Writer.write_boolean(writer, 'enabled', obj.enabled)
 8420        if obj.internal is not None:
 8421            Writer.write_boolean(writer, 'internal', obj.internal)
 8422        if obj.name is not None:
 8423            Writer.write_string(writer, 'name', obj.name)
 8424        if obj.properties is not None:
 8425            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
 8426        if obj.type is not None:
 8427            Writer.write_string(writer, 'type', obj.type.value)
 8428        writer.write_end()
 8429
 8430    @staticmethod
 8431    def write_many(objs, writer, singular=None, plural=None):
 8432        if singular is None:
 8433            singular = 'scheduling_policy_unit'
 8434        if plural is None:
 8435            plural = 'scheduling_policy_units'
 8436        writer.write_start(plural)
 8437        if type(objs) == List:
 8438            href = objs.href
 8439            if href is not None:
 8440                writer.write_attribute('href', href)
 8441        for obj in objs:
 8442            SchedulingPolicyUnitWriter.write_one(obj, writer, singular)
 8443        writer.write_end()
 8444
 8445
 8446class SeLinuxWriter(Writer):
 8447
 8448    def __init__(self):
 8449        super(SeLinuxWriter, self).__init__()
 8450
 8451    @staticmethod
 8452    def write_one(obj, writer, singular=None):
 8453        if singular is None:
 8454            singular = 'se_linux'
 8455        writer.write_start(singular)
 8456        href = obj.href
 8457        if href is not None:
 8458            writer.write_attribute('href', href)
 8459        if obj.mode is not None:
 8460            Writer.write_string(writer, 'mode', obj.mode.value)
 8461        writer.write_end()
 8462
 8463    @staticmethod
 8464    def write_many(objs, writer, singular=None, plural=None):
 8465        if singular is None:
 8466            singular = 'se_linux'
 8467        if plural is None:
 8468            plural = 'se_linuxs'
 8469        writer.write_start(plural)
 8470        if type(objs) == List:
 8471            href = objs.href
 8472            if href is not None:
 8473                writer.write_attribute('href', href)
 8474        for obj in objs:
 8475            SeLinuxWriter.write_one(obj, writer, singular)
 8476        writer.write_end()
 8477
 8478
 8479class SerialNumberWriter(Writer):
 8480
 8481    def __init__(self):
 8482        super(SerialNumberWriter, self).__init__()
 8483
 8484    @staticmethod
 8485    def write_one(obj, writer, singular=None):
 8486        if singular is None:
 8487            singular = 'serial_number'
 8488        writer.write_start(singular)
 8489        href = obj.href
 8490        if href is not None:
 8491            writer.write_attribute('href', href)
 8492        if obj.policy is not None:
 8493            Writer.write_string(writer, 'policy', obj.policy.value)
 8494        if obj.value is not None:
 8495            Writer.write_string(writer, 'value', obj.value)
 8496        writer.write_end()
 8497
 8498    @staticmethod
 8499    def write_many(objs, writer, singular=None, plural=None):
 8500        if singular is None:
 8501            singular = 'serial_number'
 8502        if plural is None:
 8503            plural = 'serial_numbers'
 8504        writer.write_start(plural)
 8505        if type(objs) == List:
 8506            href = objs.href
 8507            if href is not None:
 8508                writer.write_attribute('href', href)
 8509        for obj in objs:
 8510            SerialNumberWriter.write_one(obj, writer, singular)
 8511        writer.write_end()
 8512
 8513
 8514class SessionWriter(Writer):
 8515
 8516    def __init__(self):
 8517        super(SessionWriter, self).__init__()
 8518
 8519    @staticmethod
 8520    def write_one(obj, writer, singular=None):
 8521        if singular is None:
 8522            singular = 'session'
 8523        writer.write_start(singular)
 8524        href = obj.href
 8525        if href is not None:
 8526            writer.write_attribute('href', href)
 8527        if obj.id is not None:
 8528            writer.write_attribute('id', obj.id)
 8529        if obj.comment is not None:
 8530            Writer.write_string(writer, 'comment', obj.comment)
 8531        if obj.console_user is not None:
 8532            Writer.write_boolean(writer, 'console_user', obj.console_user)
 8533        if obj.description is not None:
 8534            Writer.write_string(writer, 'description', obj.description)
 8535        if obj.ip is not None:
 8536            IpWriter.write_one(obj.ip, writer, 'ip')
 8537        if obj.name is not None:
 8538            Writer.write_string(writer, 'name', obj.name)
 8539        if obj.protocol is not None:
 8540            Writer.write_string(writer, 'protocol', obj.protocol)
 8541        if obj.user is not None:
 8542            UserWriter.write_one(obj.user, writer, 'user')
 8543        if obj.vm is not None:
 8544            VmWriter.write_one(obj.vm, writer, 'vm')
 8545        writer.write_end()
 8546
 8547    @staticmethod
 8548    def write_many(objs, writer, singular=None, plural=None):
 8549        if singular is None:
 8550            singular = 'session'
 8551        if plural is None:
 8552            plural = 'sessions'
 8553        writer.write_start(plural)
 8554        if type(objs) == List:
 8555            href = objs.href
 8556            if href is not None:
 8557                writer.write_attribute('href', href)
 8558        for obj in objs:
 8559            SessionWriter.write_one(obj, writer, singular)
 8560        writer.write_end()
 8561
 8562
 8563class SkipIfConnectivityBrokenWriter(Writer):
 8564
 8565    def __init__(self):
 8566        super(SkipIfConnectivityBrokenWriter, self).__init__()
 8567
 8568    @staticmethod
 8569    def write_one(obj, writer, singular=None):
 8570        if singular is None:
 8571            singular = 'skip_if_connectivity_broken'
 8572        writer.write_start(singular)
 8573        href = obj.href
 8574        if href is not None:
 8575            writer.write_attribute('href', href)
 8576        if obj.enabled is not None:
 8577            Writer.write_boolean(writer, 'enabled', obj.enabled)
 8578        if obj.threshold is not None:
 8579            Writer.write_integer(writer, 'threshold', obj.threshold)
 8580        writer.write_end()
 8581
 8582    @staticmethod
 8583    def write_many(objs, writer, singular=None, plural=None):
 8584        if singular is None:
 8585            singular = 'skip_if_connectivity_broken'
 8586        if plural is None:
 8587            plural = 'skip_if_connectivity_brokens'
 8588        writer.write_start(plural)
 8589        if type(objs) == List:
 8590            href = objs.href
 8591            if href is not None:
 8592                writer.write_attribute('href', href)
 8593        for obj in objs:
 8594            SkipIfConnectivityBrokenWriter.write_one(obj, writer, singular)
 8595        writer.write_end()
 8596
 8597
 8598class SkipIfSdActiveWriter(Writer):
 8599
 8600    def __init__(self):
 8601        super(SkipIfSdActiveWriter, self).__init__()
 8602
 8603    @staticmethod
 8604    def write_one(obj, writer, singular=None):
 8605        if singular is None:
 8606            singular = 'skip_if_sd_active'
 8607        writer.write_start(singular)
 8608        href = obj.href
 8609        if href is not None:
 8610            writer.write_attribute('href', href)
 8611        if obj.enabled is not None:
 8612            Writer.write_boolean(writer, 'enabled', obj.enabled)
 8613        writer.write_end()
 8614
 8615    @staticmethod
 8616    def write_many(objs, writer, singular=None, plural=None):
 8617        if singular is None:
 8618            singular = 'skip_if_sd_active'
 8619        if plural is None:
 8620            plural = 'skip_if_sd_actives'
 8621        writer.write_start(plural)
 8622        if type(objs) == List:
 8623            href = objs.href
 8624            if href is not None:
 8625                writer.write_attribute('href', href)
 8626        for obj in objs:
 8627            SkipIfSdActiveWriter.write_one(obj, writer, singular)
 8628        writer.write_end()
 8629
 8630
 8631class SnapshotWriter(Writer):
 8632
 8633    def __init__(self):
 8634        super(SnapshotWriter, self).__init__()
 8635
 8636    @staticmethod
 8637    def write_one(obj, writer, singular=None):
 8638        if singular is None:
 8639            singular = 'snapshot'
 8640        writer.write_start(singular)
 8641        href = obj.href
 8642        if href is not None:
 8643            writer.write_attribute('href', href)
 8644        if obj.id is not None:
 8645            writer.write_attribute('id', obj.id)
 8646        if obj.auto_pinning_policy is not None:
 8647            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
 8648        if obj.bios is not None:
 8649            BiosWriter.write_one(obj.bios, writer, 'bios')
 8650        if obj.comment is not None:
 8651            Writer.write_string(writer, 'comment', obj.comment)
 8652        if obj.console is not None:
 8653            ConsoleWriter.write_one(obj.console, writer, 'console')
 8654        if obj.cpu is not None:
 8655            CpuWriter.write_one(obj.cpu, writer, 'cpu')
 8656        if obj.cpu_pinning_policy is not None:
 8657            Writer.write_string(writer, 'cpu_pinning_policy', obj.cpu_pinning_policy.value)
 8658        if obj.cpu_shares is not None:
 8659            Writer.write_integer(writer, 'cpu_shares', obj.cpu_shares)
 8660        if obj.creation_time is not None:
 8661            Writer.write_date(writer, 'creation_time', obj.creation_time)
 8662        if obj.custom_compatibility_version is not None:
 8663            VersionWriter.write_one(obj.custom_compatibility_version, writer, 'custom_compatibility_version')
 8664        if obj.custom_cpu_model is not None:
 8665            Writer.write_string(writer, 'custom_cpu_model', obj.custom_cpu_model)
 8666        if obj.custom_emulated_machine is not None:
 8667            Writer.write_string(writer, 'custom_emulated_machine', obj.custom_emulated_machine)
 8668        if obj.custom_properties is not None:
 8669            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
 8670        if obj.date is not None:
 8671            Writer.write_date(writer, 'date', obj.date)
 8672        if obj.delete_protected is not None:
 8673            Writer.write_boolean(writer, 'delete_protected', obj.delete_protected)
 8674        if obj.description is not None:
 8675            Writer.write_string(writer, 'description', obj.description)
 8676        if obj.display is not None:
 8677            DisplayWriter.write_one(obj.display, writer, 'display')
 8678        if obj.domain is not None:
 8679            DomainWriter.write_one(obj.domain, writer, 'domain')
 8680        if obj.fqdn is not None:
 8681            Writer.write_string(writer, 'fqdn', obj.fqdn)
 8682        if obj.guest_operating_system is not None:
 8683            GuestOperatingSystemWriter.write_one(obj.guest_operating_system, writer, 'guest_operating_system')
 8684        if obj.guest_time_zone is not None:
 8685            TimeZoneWriter.write_one(obj.guest_time_zone, writer, 'guest_time_zone')
 8686        if obj.has_illegal_images is not None:
 8687            Writer.write_boolean(writer, 'has_illegal_images', obj.has_illegal_images)
 8688        if obj.high_availability is not None:
 8689            HighAvailabilityWriter.write_one(obj.high_availability, writer, 'high_availability')
 8690        if obj.initialization is not None:
 8691            InitializationWriter.write_one(obj.initialization, writer, 'initialization')
 8692        if obj.io is not None:
 8693            IoWriter.write_one(obj.io, writer, 'io')
 8694        if obj.large_icon is not None:
 8695            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
 8696        if obj.lease is not None:
 8697            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
 8698        if obj.memory is not None:
 8699            Writer.write_integer(writer, 'memory', obj.memory)
 8700        if obj.memory_policy is not None:
 8701            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
 8702        if obj.migration is not None:
 8703            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
 8704        if obj.migration_downtime is not None:
 8705            Writer.write_integer(writer, 'migration_downtime', obj.migration_downtime)
 8706        if obj.multi_queues_enabled is not None:
 8707            Writer.write_boolean(writer, 'multi_queues_enabled', obj.multi_queues_enabled)
 8708        if obj.name is not None:
 8709            Writer.write_string(writer, 'name', obj.name)
 8710        if obj.next_run_configuration_exists is not None:
 8711            Writer.write_boolean(writer, 'next_run_configuration_exists', obj.next_run_configuration_exists)
 8712        if obj.numa_tune_mode is not None:
 8713            Writer.write_string(writer, 'numa_tune_mode', obj.numa_tune_mode.value)
 8714        if obj.origin is not None:
 8715            Writer.write_string(writer, 'origin', obj.origin)
 8716        if obj.os is not None:
 8717            OperatingSystemWriter.write_one(obj.os, writer, 'os')
 8718        if obj.payloads is not None:
 8719            PayloadWriter.write_many(obj.payloads, writer, 'payload', 'payloads')
 8720        if obj.persist_memorystate is not None:
 8721            Writer.write_boolean(writer, 'persist_memorystate', obj.persist_memorystate)
 8722        if obj.placement_policy is not None:
 8723            VmPlacementPolicyWriter.write_one(obj.placement_policy, writer, 'placement_policy')
 8724        if obj.rng_device is not None:
 8725            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
 8726        if obj.run_once is not None:
 8727            Writer.write_boolean(writer, 'run_once', obj.run_once)
 8728        if obj.serial_number is not None:
 8729            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
 8730        if obj.small_icon is not None:
 8731            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
 8732        if obj.snapshot_status is not None:
 8733            Writer.write_string(writer, 'snapshot_status', obj.snapshot_status.value)
 8734        if obj.snapshot_type is not None:
 8735            Writer.write_string(writer, 'snapshot_type', obj.snapshot_type.value)
 8736        if obj.soundcard_enabled is not None:
 8737            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
 8738        if obj.sso is not None:
 8739            SsoWriter.write_one(obj.sso, writer, 'sso')
 8740        if obj.start_paused is not None:
 8741            Writer.write_boolean(writer, 'start_paused', obj.start_paused)
 8742        if obj.start_time is not None:
 8743            Writer.write_date(writer, 'start_time', obj.start_time)
 8744        if obj.stateless is not None:
 8745            Writer.write_boolean(writer, 'stateless', obj.stateless)
 8746        if obj.status is not None:
 8747            Writer.write_string(writer, 'status', obj.status.value)
 8748        if obj.status_detail is not None:
 8749            Writer.write_string(writer, 'status_detail', obj.status_detail)
 8750        if obj.stop_reason is not None:
 8751            Writer.write_string(writer, 'stop_reason', obj.stop_reason)
 8752        if obj.stop_time is not None:
 8753            Writer.write_date(writer, 'stop_time', obj.stop_time)
 8754        if obj.storage_error_resume_behaviour is not None:
 8755            Writer.write_string(writer, 'storage_error_resume_behaviour', obj.storage_error_resume_behaviour.value)
 8756        if obj.time_zone is not None:
 8757            TimeZoneWriter.write_one(obj.time_zone, writer, 'time_zone')
 8758        if obj.tpm_enabled is not None:
 8759            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
 8760        if obj.tunnel_migration is not None:
 8761            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
 8762        if obj.type is not None:
 8763            Writer.write_string(writer, 'type', obj.type.value)
 8764        if obj.usb is not None:
 8765            UsbWriter.write_one(obj.usb, writer, 'usb')
 8766        if obj.use_latest_template_version is not None:
 8767            Writer.write_boolean(writer, 'use_latest_template_version', obj.use_latest_template_version)
 8768        if obj.virtio_scsi is not None:
 8769            VirtioScsiWriter.write_one(obj.virtio_scsi, writer, 'virtio_scsi')
 8770        if obj.virtio_scsi_multi_queues is not None:
 8771            Writer.write_integer(writer, 'virtio_scsi_multi_queues', obj.virtio_scsi_multi_queues)
 8772        if obj.virtio_scsi_multi_queues_enabled is not None:
 8773            Writer.write_boolean(writer, 'virtio_scsi_multi_queues_enabled', obj.virtio_scsi_multi_queues_enabled)
 8774        if obj.affinity_labels is not None:
 8775            AffinityLabelWriter.write_many(obj.affinity_labels, writer, 'affinity_label', 'affinity_labels')
 8776        if obj.applications is not None:
 8777            ApplicationWriter.write_many(obj.applications, writer, 'application', 'applications')
 8778        if obj.cdroms is not None:
 8779            CdromWriter.write_many(obj.cdroms, writer, 'cdrom', 'cdroms')
 8780        if obj.cluster is not None:
 8781            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
 8782        if obj.cpu_profile is not None:
 8783            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
 8784        if obj.disk_attachments is not None:
 8785            DiskAttachmentWriter.write_many(obj.disk_attachments, writer, 'disk_attachment', 'disk_attachments')
 8786        if obj.disks is not None:
 8787            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
 8788        if obj.dynamic_cpu is not None:
 8789            DynamicCpuWriter.write_one(obj.dynamic_cpu, writer, 'dynamic_cpu')
 8790        if obj.external_host_provider is not None:
 8791            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
 8792        if obj.floppies is not None:
 8793            FloppyWriter.write_many(obj.floppies, writer, 'floppy', 'floppies')
 8794        if obj.graphics_consoles is not None:
 8795            GraphicsConsoleWriter.write_many(obj.graphics_consoles, writer, 'graphics_console', 'graphics_consoles')
 8796        if obj.host is not None:
 8797            HostWriter.write_one(obj.host, writer, 'host')
 8798        if obj.host_devices is not None:
 8799            HostDeviceWriter.write_many(obj.host_devices, writer, 'host_device', 'host_devices')
 8800        if obj.instance_type is not None:
 8801            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
 8802        if obj.katello_errata is not None:
 8803            KatelloErratumWriter.write_many(obj.katello_errata, writer, 'katello_erratum', 'katello_errata')
 8804        if obj.mediated_devices is not None:
 8805            VmMediatedDeviceWriter.write_many(obj.mediated_devices, writer, 'vm_mediated_device', 'mediated_devices')
 8806        if obj.nics is not None:
 8807            NicWriter.write_many(obj.nics, writer, 'nic', 'nics')
 8808        if obj.numa_nodes is not None:
 8809            NumaNodeWriter.write_many(obj.numa_nodes, writer, 'host_numa_node', 'host_numa_nodes')
 8810        if obj.original_template is not None:
 8811            TemplateWriter.write_one(obj.original_template, writer, 'original_template')
 8812        if obj.permissions is not None:
 8813            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 8814        if obj.quota is not None:
 8815            QuotaWriter.write_one(obj.quota, writer, 'quota')
 8816        if obj.reported_devices is not None:
 8817            ReportedDeviceWriter.write_many(obj.reported_devices, writer, 'reported_device', 'reported_devices')
 8818        if obj.sessions is not None:
 8819            SessionWriter.write_many(obj.sessions, writer, 'session', 'sessions')
 8820        if obj.snapshots is not None:
 8821            SnapshotWriter.write_many(obj.snapshots, writer, 'snapshot', 'snapshots')
 8822        if obj.statistics is not None:
 8823            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
 8824        if obj.storage_domain is not None:
 8825            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
 8826        if obj.tags is not None:
 8827            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
 8828        if obj.template is not None:
 8829            TemplateWriter.write_one(obj.template, writer, 'template')
 8830        if obj.vm is not None:
 8831            VmWriter.write_one(obj.vm, writer, 'vm')
 8832        if obj.vm_pool is not None:
 8833            VmPoolWriter.write_one(obj.vm_pool, writer, 'vm_pool')
 8834        if obj.watchdogs is not None:
 8835            WatchdogWriter.write_many(obj.watchdogs, writer, 'watchdog', 'watchdogs')
 8836        writer.write_end()
 8837
 8838    @staticmethod
 8839    def write_many(objs, writer, singular=None, plural=None):
 8840        if singular is None:
 8841            singular = 'snapshot'
 8842        if plural is None:
 8843            plural = 'snapshots'
 8844        writer.write_start(plural)
 8845        if type(objs) == List:
 8846            href = objs.href
 8847            if href is not None:
 8848                writer.write_attribute('href', href)
 8849        for obj in objs:
 8850            SnapshotWriter.write_one(obj, writer, singular)
 8851        writer.write_end()
 8852
 8853
 8854class SpecialObjectsWriter(Writer):
 8855
 8856    def __init__(self):
 8857        super(SpecialObjectsWriter, self).__init__()
 8858
 8859    @staticmethod
 8860    def write_one(obj, writer, singular=None):
 8861        if singular is None:
 8862            singular = 'special_objects'
 8863        writer.write_start(singular)
 8864        href = obj.href
 8865        if href is not None:
 8866            writer.write_attribute('href', href)
 8867        if obj.blank_template is not None:
 8868            TemplateWriter.write_one(obj.blank_template, writer, 'blank_template')
 8869        if obj.root_tag is not None:
 8870            TagWriter.write_one(obj.root_tag, writer, 'root_tag')
 8871        writer.write_end()
 8872
 8873    @staticmethod
 8874    def write_many(objs, writer, singular=None, plural=None):
 8875        if singular is None:
 8876            singular = 'special_objects'
 8877        if plural is None:
 8878            plural = 'special_objectss'
 8879        writer.write_start(plural)
 8880        if type(objs) == List:
 8881            href = objs.href
 8882            if href is not None:
 8883                writer.write_attribute('href', href)
 8884        for obj in objs:
 8885            SpecialObjectsWriter.write_one(obj, writer, singular)
 8886        writer.write_end()
 8887
 8888
 8889class SpmWriter(Writer):
 8890
 8891    def __init__(self):
 8892        super(SpmWriter, self).__init__()
 8893
 8894    @staticmethod
 8895    def write_one(obj, writer, singular=None):
 8896        if singular is None:
 8897            singular = 'spm'
 8898        writer.write_start(singular)
 8899        href = obj.href
 8900        if href is not None:
 8901            writer.write_attribute('href', href)
 8902        if obj.priority is not None:
 8903            Writer.write_integer(writer, 'priority', obj.priority)
 8904        if obj.status is not None:
 8905            Writer.write_string(writer, 'status', obj.status.value)
 8906        writer.write_end()
 8907
 8908    @staticmethod
 8909    def write_many(objs, writer, singular=None, plural=None):
 8910        if singular is None:
 8911            singular = 'spm'
 8912        if plural is None:
 8913            plural = 'spms'
 8914        writer.write_start(plural)
 8915        if type(objs) == List:
 8916            href = objs.href
 8917            if href is not None:
 8918                writer.write_attribute('href', href)
 8919        for obj in objs:
 8920            SpmWriter.write_one(obj, writer, singular)
 8921        writer.write_end()
 8922
 8923
 8924class SshWriter(Writer):
 8925
 8926    def __init__(self):
 8927        super(SshWriter, self).__init__()
 8928
 8929    @staticmethod
 8930    def write_one(obj, writer, singular=None):
 8931        if singular is None:
 8932            singular = 'ssh'
 8933        writer.write_start(singular)
 8934        href = obj.href
 8935        if href is not None:
 8936            writer.write_attribute('href', href)
 8937        if obj.id is not None:
 8938            writer.write_attribute('id', obj.id)
 8939        if obj.authentication_method is not None:
 8940            Writer.write_string(writer, 'authentication_method', obj.authentication_method.value)
 8941        if obj.comment is not None:
 8942            Writer.write_string(writer, 'comment', obj.comment)
 8943        if obj.description is not None:
 8944            Writer.write_string(writer, 'description', obj.description)
 8945        if obj.fingerprint is not None:
 8946            Writer.write_string(writer, 'fingerprint', obj.fingerprint)
 8947        if obj.name is not None:
 8948            Writer.write_string(writer, 'name', obj.name)
 8949        if obj.port is not None:
 8950            Writer.write_integer(writer, 'port', obj.port)
 8951        if obj.public_key is not None:
 8952            Writer.write_string(writer, 'public_key', obj.public_key)
 8953        if obj.user is not None:
 8954            UserWriter.write_one(obj.user, writer, 'user')
 8955        writer.write_end()
 8956
 8957    @staticmethod
 8958    def write_many(objs, writer, singular=None, plural=None):
 8959        if singular is None:
 8960            singular = 'ssh'
 8961        if plural is None:
 8962            plural = 'sshs'
 8963        writer.write_start(plural)
 8964        if type(objs) == List:
 8965            href = objs.href
 8966            if href is not None:
 8967                writer.write_attribute('href', href)
 8968        for obj in objs:
 8969            SshWriter.write_one(obj, writer, singular)
 8970        writer.write_end()
 8971
 8972
 8973class SshPublicKeyWriter(Writer):
 8974
 8975    def __init__(self):
 8976        super(SshPublicKeyWriter, self).__init__()
 8977
 8978    @staticmethod
 8979    def write_one(obj, writer, singular=None):
 8980        if singular is None:
 8981            singular = 'ssh_public_key'
 8982        writer.write_start(singular)
 8983        href = obj.href
 8984        if href is not None:
 8985            writer.write_attribute('href', href)
 8986        if obj.id is not None:
 8987            writer.write_attribute('id', obj.id)
 8988        if obj.comment is not None:
 8989            Writer.write_string(writer, 'comment', obj.comment)
 8990        if obj.content is not None:
 8991            Writer.write_string(writer, 'content', obj.content)
 8992        if obj.description is not None:
 8993            Writer.write_string(writer, 'description', obj.description)
 8994        if obj.name is not None:
 8995            Writer.write_string(writer, 'name', obj.name)
 8996        if obj.user is not None:
 8997            UserWriter.write_one(obj.user, writer, 'user')
 8998        writer.write_end()
 8999
 9000    @staticmethod
 9001    def write_many(objs, writer, singular=None, plural=None):
 9002        if singular is None:
 9003            singular = 'ssh_public_key'
 9004        if plural is None:
 9005            plural = 'ssh_public_keys'
 9006        writer.write_start(plural)
 9007        if type(objs) == List:
 9008            href = objs.href
 9009            if href is not None:
 9010                writer.write_attribute('href', href)
 9011        for obj in objs:
 9012            SshPublicKeyWriter.write_one(obj, writer, singular)
 9013        writer.write_end()
 9014
 9015
 9016class SsoWriter(Writer):
 9017
 9018    def __init__(self):
 9019        super(SsoWriter, self).__init__()
 9020
 9021    @staticmethod
 9022    def write_one(obj, writer, singular=None):
 9023        if singular is None:
 9024            singular = 'sso'
 9025        writer.write_start(singular)
 9026        href = obj.href
 9027        if href is not None:
 9028            writer.write_attribute('href', href)
 9029        if obj.methods is not None:
 9030            MethodWriter.write_many(obj.methods, writer, 'method', 'methods')
 9031        writer.write_end()
 9032
 9033    @staticmethod
 9034    def write_many(objs, writer, singular=None, plural=None):
 9035        if singular is None:
 9036            singular = 'sso'
 9037        if plural is None:
 9038            plural = 'ssos'
 9039        writer.write_start(plural)
 9040        if type(objs) == List:
 9041            href = objs.href
 9042            if href is not None:
 9043                writer.write_attribute('href', href)
 9044        for obj in objs:
 9045            SsoWriter.write_one(obj, writer, singular)
 9046        writer.write_end()
 9047
 9048
 9049class StatisticWriter(Writer):
 9050
 9051    def __init__(self):
 9052        super(StatisticWriter, self).__init__()
 9053
 9054    @staticmethod
 9055    def write_one(obj, writer, singular=None):
 9056        if singular is None:
 9057            singular = 'statistic'
 9058        writer.write_start(singular)
 9059        href = obj.href
 9060        if href is not None:
 9061            writer.write_attribute('href', href)
 9062        if obj.id is not None:
 9063            writer.write_attribute('id', obj.id)
 9064        if obj.comment is not None:
 9065            Writer.write_string(writer, 'comment', obj.comment)
 9066        if obj.description is not None:
 9067            Writer.write_string(writer, 'description', obj.description)
 9068        if obj.kind is not None:
 9069            Writer.write_string(writer, 'kind', obj.kind.value)
 9070        if obj.name is not None:
 9071            Writer.write_string(writer, 'name', obj.name)
 9072        if obj.type is not None:
 9073            Writer.write_string(writer, 'type', obj.type.value)
 9074        if obj.unit is not None:
 9075            Writer.write_string(writer, 'unit', obj.unit.value)
 9076        if obj.values is not None:
 9077            ValueWriter.write_many(obj.values, writer, 'value', 'values')
 9078        if obj.brick is not None:
 9079            GlusterBrickWriter.write_one(obj.brick, writer, 'brick')
 9080        if obj.disk is not None:
 9081            DiskWriter.write_one(obj.disk, writer, 'disk')
 9082        if obj.gluster_volume is not None:
 9083            GlusterVolumeWriter.write_one(obj.gluster_volume, writer, 'gluster_volume')
 9084        if obj.host is not None:
 9085            HostWriter.write_one(obj.host, writer, 'host')
 9086        if obj.host_nic is not None:
 9087            HostNicWriter.write_one(obj.host_nic, writer, 'host_nic')
 9088        if obj.host_numa_node is not None:
 9089            NumaNodeWriter.write_one(obj.host_numa_node, writer, 'host_numa_node')
 9090        if obj.nic is not None:
 9091            NicWriter.write_one(obj.nic, writer, 'nic')
 9092        if obj.step is not None:
 9093            StepWriter.write_one(obj.step, writer, 'step')
 9094        if obj.vm is not None:
 9095            VmWriter.write_one(obj.vm, writer, 'vm')
 9096        writer.write_end()
 9097
 9098    @staticmethod
 9099    def write_many(objs, writer, singular=None, plural=None):
 9100        if singular is None:
 9101            singular = 'statistic'
 9102        if plural is None:
 9103            plural = 'statistics'
 9104        writer.write_start(plural)
 9105        if type(objs) == List:
 9106            href = objs.href
 9107            if href is not None:
 9108                writer.write_attribute('href', href)
 9109        for obj in objs:
 9110            StatisticWriter.write_one(obj, writer, singular)
 9111        writer.write_end()
 9112
 9113
 9114class StepWriter(Writer):
 9115
 9116    def __init__(self):
 9117        super(StepWriter, self).__init__()
 9118
 9119    @staticmethod
 9120    def write_one(obj, writer, singular=None):
 9121        if singular is None:
 9122            singular = 'step'
 9123        writer.write_start(singular)
 9124        href = obj.href
 9125        if href is not None:
 9126            writer.write_attribute('href', href)
 9127        if obj.id is not None:
 9128            writer.write_attribute('id', obj.id)
 9129        if obj.comment is not None:
 9130            Writer.write_string(writer, 'comment', obj.comment)
 9131        if obj.description is not None:
 9132            Writer.write_string(writer, 'description', obj.description)
 9133        if obj.end_time is not None:
 9134            Writer.write_date(writer, 'end_time', obj.end_time)
 9135        if obj.external is not None:
 9136            Writer.write_boolean(writer, 'external', obj.external)
 9137        if obj.external_type is not None:
 9138            Writer.write_string(writer, 'external_type', obj.external_type.value)
 9139        if obj.name is not None:
 9140            Writer.write_string(writer, 'name', obj.name)
 9141        if obj.number is not None:
 9142            Writer.write_integer(writer, 'number', obj.number)
 9143        if obj.progress is not None:
 9144            Writer.write_integer(writer, 'progress', obj.progress)
 9145        if obj.start_time is not None:
 9146            Writer.write_date(writer, 'start_time', obj.start_time)
 9147        if obj.status is not None:
 9148            Writer.write_string(writer, 'status', obj.status.value)
 9149        if obj.type is not None:
 9150            Writer.write_string(writer, 'type', obj.type.value)
 9151        if obj.execution_host is not None:
 9152            HostWriter.write_one(obj.execution_host, writer, 'execution_host')
 9153        if obj.job is not None:
 9154            JobWriter.write_one(obj.job, writer, 'job')
 9155        if obj.parent_step is not None:
 9156            StepWriter.write_one(obj.parent_step, writer, 'parent_step')
 9157        if obj.statistics is not None:
 9158            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
 9159        writer.write_end()
 9160
 9161    @staticmethod
 9162    def write_many(objs, writer, singular=None, plural=None):
 9163        if singular is None:
 9164            singular = 'step'
 9165        if plural is None:
 9166            plural = 'steps'
 9167        writer.write_start(plural)
 9168        if type(objs) == List:
 9169            href = objs.href
 9170            if href is not None:
 9171                writer.write_attribute('href', href)
 9172        for obj in objs:
 9173            StepWriter.write_one(obj, writer, singular)
 9174        writer.write_end()
 9175
 9176
 9177class StorageConnectionWriter(Writer):
 9178
 9179    def __init__(self):
 9180        super(StorageConnectionWriter, self).__init__()
 9181
 9182    @staticmethod
 9183    def write_one(obj, writer, singular=None):
 9184        if singular is None:
 9185            singular = 'storage_connection'
 9186        writer.write_start(singular)
 9187        href = obj.href
 9188        if href is not None:
 9189            writer.write_attribute('href', href)
 9190        if obj.id is not None:
 9191            writer.write_attribute('id', obj.id)
 9192        if obj.address is not None:
 9193            Writer.write_string(writer, 'address', obj.address)
 9194        if obj.comment is not None:
 9195            Writer.write_string(writer, 'comment', obj.comment)
 9196        if obj.description is not None:
 9197            Writer.write_string(writer, 'description', obj.description)
 9198        if obj.mount_options is not None:
 9199            Writer.write_string(writer, 'mount_options', obj.mount_options)
 9200        if obj.name is not None:
 9201            Writer.write_string(writer, 'name', obj.name)
 9202        if obj.nfs_retrans is not None:
 9203            Writer.write_integer(writer, 'nfs_retrans', obj.nfs_retrans)
 9204        if obj.nfs_timeo is not None:
 9205            Writer.write_integer(writer, 'nfs_timeo', obj.nfs_timeo)
 9206        if obj.nfs_version is not None:
 9207            Writer.write_string(writer, 'nfs_version', obj.nfs_version.value)
 9208        if obj.password is not None:
 9209            Writer.write_string(writer, 'password', obj.password)
 9210        if obj.path is not None:
 9211            Writer.write_string(writer, 'path', obj.path)
 9212        if obj.port is not None:
 9213            Writer.write_integer(writer, 'port', obj.port)
 9214        if obj.portal is not None:
 9215            Writer.write_string(writer, 'portal', obj.portal)
 9216        if obj.target is not None:
 9217            Writer.write_string(writer, 'target', obj.target)
 9218        if obj.type is not None:
 9219            Writer.write_string(writer, 'type', obj.type.value)
 9220        if obj.username is not None:
 9221            Writer.write_string(writer, 'username', obj.username)
 9222        if obj.vfs_type is not None:
 9223            Writer.write_string(writer, 'vfs_type', obj.vfs_type)
 9224        if obj.gluster_volume is not None:
 9225            GlusterVolumeWriter.write_one(obj.gluster_volume, writer, 'gluster_volume')
 9226        if obj.host is not None:
 9227            HostWriter.write_one(obj.host, writer, 'host')
 9228        writer.write_end()
 9229
 9230    @staticmethod
 9231    def write_many(objs, writer, singular=None, plural=None):
 9232        if singular is None:
 9233            singular = 'storage_connection'
 9234        if plural is None:
 9235            plural = 'storage_connections'
 9236        writer.write_start(plural)
 9237        if type(objs) == List:
 9238            href = objs.href
 9239            if href is not None:
 9240                writer.write_attribute('href', href)
 9241        for obj in objs:
 9242            StorageConnectionWriter.write_one(obj, writer, singular)
 9243        writer.write_end()
 9244
 9245
 9246class StorageConnectionExtensionWriter(Writer):
 9247
 9248    def __init__(self):
 9249        super(StorageConnectionExtensionWriter, self).__init__()
 9250
 9251    @staticmethod
 9252    def write_one(obj, writer, singular=None):
 9253        if singular is None:
 9254            singular = 'storage_connection_extension'
 9255        writer.write_start(singular)
 9256        href = obj.href
 9257        if href is not None:
 9258            writer.write_attribute('href', href)
 9259        if obj.id is not None:
 9260            writer.write_attribute('id', obj.id)
 9261        if obj.comment is not None:
 9262            Writer.write_string(writer, 'comment', obj.comment)
 9263        if obj.description is not None:
 9264            Writer.write_string(writer, 'description', obj.description)
 9265        if obj.name is not None:
 9266            Writer.write_string(writer, 'name', obj.name)
 9267        if obj.password is not None:
 9268            Writer.write_string(writer, 'password', obj.password)
 9269        if obj.target is not None:
 9270            Writer.write_string(writer, 'target', obj.target)
 9271        if obj.username is not None:
 9272            Writer.write_string(writer, 'username', obj.username)
 9273        if obj.host is not None:
 9274            HostWriter.write_one(obj.host, writer, 'host')
 9275        writer.write_end()
 9276
 9277    @staticmethod
 9278    def write_many(objs, writer, singular=None, plural=None):
 9279        if singular is None:
 9280            singular = 'storage_connection_extension'
 9281        if plural is None:
 9282            plural = 'storage_connection_extensions'
 9283        writer.write_start(plural)
 9284        if type(objs) == List:
 9285            href = objs.href
 9286            if href is not None:
 9287                writer.write_attribute('href', href)
 9288        for obj in objs:
 9289            StorageConnectionExtensionWriter.write_one(obj, writer, singular)
 9290        writer.write_end()
 9291
 9292
 9293class StorageDomainWriter(Writer):
 9294
 9295    def __init__(self):
 9296        super(StorageDomainWriter, self).__init__()
 9297
 9298    @staticmethod
 9299    def write_one(obj, writer, singular=None):
 9300        if singular is None:
 9301            singular = 'storage_domain'
 9302        writer.write_start(singular)
 9303        href = obj.href
 9304        if href is not None:
 9305            writer.write_attribute('href', href)
 9306        if obj.id is not None:
 9307            writer.write_attribute('id', obj.id)
 9308        if obj.available is not None:
 9309            Writer.write_integer(writer, 'available', obj.available)
 9310        if obj.backup is not None:
 9311            Writer.write_boolean(writer, 'backup', obj.backup)
 9312        if obj.block_size is not None:
 9313            Writer.write_integer(writer, 'block_size', obj.block_size)
 9314        if obj.comment is not None:
 9315            Writer.write_string(writer, 'comment', obj.comment)
 9316        if obj.committed is not None:
 9317            Writer.write_integer(writer, 'committed', obj.committed)
 9318        if obj.critical_space_action_blocker is not None:
 9319            Writer.write_integer(writer, 'critical_space_action_blocker', obj.critical_space_action_blocker)
 9320        if obj.description is not None:
 9321            Writer.write_string(writer, 'description', obj.description)
 9322        if obj.discard_after_delete is not None:
 9323            Writer.write_boolean(writer, 'discard_after_delete', obj.discard_after_delete)
 9324        if obj.external_status is not None:
 9325            Writer.write_string(writer, 'external_status', obj.external_status.value)
 9326        if obj.import_ is not None:
 9327            Writer.write_boolean(writer, 'import', obj.import_)
 9328        if obj.master is not None:
 9329            Writer.write_boolean(writer, 'master', obj.master)
 9330        if obj.name is not None:
 9331            Writer.write_string(writer, 'name', obj.name)
 9332        if obj.status is not None:
 9333            Writer.write_string(writer, 'status', obj.status.value)
 9334        if obj.storage is not None:
 9335            HostStorageWriter.write_one(obj.storage, writer, 'storage')
 9336        if obj.storage_format is not None:
 9337            Writer.write_string(writer, 'storage_format', obj.storage_format.value)
 9338        if obj.supports_discard is not None:
 9339            Writer.write_boolean(writer, 'supports_discard', obj.supports_discard)
 9340        if obj.supports_discard_zeroes_data is not None:
 9341            Writer.write_boolean(writer, 'supports_discard_zeroes_data', obj.supports_discard_zeroes_data)
 9342        if obj.type is not None:
 9343            Writer.write_string(writer, 'type', obj.type.value)
 9344        if obj.used is not None:
 9345            Writer.write_integer(writer, 'used', obj.used)
 9346        if obj.warning_low_space_indicator is not None:
 9347            Writer.write_integer(writer, 'warning_low_space_indicator', obj.warning_low_space_indicator)
 9348        if obj.wipe_after_delete is not None:
 9349            Writer.write_boolean(writer, 'wipe_after_delete', obj.wipe_after_delete)
 9350        if obj.data_center is not None:
 9351            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
 9352        if obj.data_centers is not None:
 9353            DataCenterWriter.write_many(obj.data_centers, writer, 'data_center', 'data_centers')
 9354        if obj.disk_profiles is not None:
 9355            DiskProfileWriter.write_many(obj.disk_profiles, writer, 'disk_profile', 'disk_profiles')
 9356        if obj.disk_snapshots is not None:
 9357            DiskSnapshotWriter.write_many(obj.disk_snapshots, writer, 'disk_snapshot', 'disk_snapshots')
 9358        if obj.disks is not None:
 9359            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
 9360        if obj.files is not None:
 9361            FileWriter.write_many(obj.files, writer, 'file', 'files')
 9362        if obj.host is not None:
 9363            HostWriter.write_one(obj.host, writer, 'host')
 9364        if obj.images is not None:
 9365            ImageWriter.write_many(obj.images, writer, 'image', 'images')
 9366        if obj.permissions is not None:
 9367            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 9368        if obj.storage_connections is not None:
 9369            StorageConnectionWriter.write_many(obj.storage_connections, writer, 'storage_connection', 'storage_connections')
 9370        if obj.templates is not None:
 9371            TemplateWriter.write_many(obj.templates, writer, 'template', 'templates')
 9372        if obj.vms is not None:
 9373            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
 9374        writer.write_end()
 9375
 9376    @staticmethod
 9377    def write_many(objs, writer, singular=None, plural=None):
 9378        if singular is None:
 9379            singular = 'storage_domain'
 9380        if plural is None:
 9381            plural = 'storage_domains'
 9382        writer.write_start(plural)
 9383        if type(objs) == List:
 9384            href = objs.href
 9385            if href is not None:
 9386                writer.write_attribute('href', href)
 9387        for obj in objs:
 9388            StorageDomainWriter.write_one(obj, writer, singular)
 9389        writer.write_end()
 9390
 9391
 9392class StorageDomainLeaseWriter(Writer):
 9393
 9394    def __init__(self):
 9395        super(StorageDomainLeaseWriter, self).__init__()
 9396
 9397    @staticmethod
 9398    def write_one(obj, writer, singular=None):
 9399        if singular is None:
 9400            singular = 'storage_domain_lease'
 9401        writer.write_start(singular)
 9402        href = obj.href
 9403        if href is not None:
 9404            writer.write_attribute('href', href)
 9405        if obj.storage_domain is not None:
 9406            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
 9407        writer.write_end()
 9408
 9409    @staticmethod
 9410    def write_many(objs, writer, singular=None, plural=None):
 9411        if singular is None:
 9412            singular = 'storage_domain_lease'
 9413        if plural is None:
 9414            plural = 'storage_domain_leases'
 9415        writer.write_start(plural)
 9416        if type(objs) == List:
 9417            href = objs.href
 9418            if href is not None:
 9419                writer.write_attribute('href', href)
 9420        for obj in objs:
 9421            StorageDomainLeaseWriter.write_one(obj, writer, singular)
 9422        writer.write_end()
 9423
 9424
 9425class SystemOptionWriter(Writer):
 9426
 9427    def __init__(self):
 9428        super(SystemOptionWriter, self).__init__()
 9429
 9430    @staticmethod
 9431    def write_one(obj, writer, singular=None):
 9432        if singular is None:
 9433            singular = 'system_option'
 9434        writer.write_start(singular)
 9435        href = obj.href
 9436        if href is not None:
 9437            writer.write_attribute('href', href)
 9438        if obj.id is not None:
 9439            writer.write_attribute('id', obj.id)
 9440        if obj.comment is not None:
 9441            Writer.write_string(writer, 'comment', obj.comment)
 9442        if obj.description is not None:
 9443            Writer.write_string(writer, 'description', obj.description)
 9444        if obj.name is not None:
 9445            Writer.write_string(writer, 'name', obj.name)
 9446        if obj.values is not None:
 9447            SystemOptionValueWriter.write_many(obj.values, writer, 'system_option_value', 'values')
 9448        writer.write_end()
 9449
 9450    @staticmethod
 9451    def write_many(objs, writer, singular=None, plural=None):
 9452        if singular is None:
 9453            singular = 'system_option'
 9454        if plural is None:
 9455            plural = 'system_options'
 9456        writer.write_start(plural)
 9457        if type(objs) == List:
 9458            href = objs.href
 9459            if href is not None:
 9460                writer.write_attribute('href', href)
 9461        for obj in objs:
 9462            SystemOptionWriter.write_one(obj, writer, singular)
 9463        writer.write_end()
 9464
 9465
 9466class SystemOptionValueWriter(Writer):
 9467
 9468    def __init__(self):
 9469        super(SystemOptionValueWriter, self).__init__()
 9470
 9471    @staticmethod
 9472    def write_one(obj, writer, singular=None):
 9473        if singular is None:
 9474            singular = 'system_option_value'
 9475        writer.write_start(singular)
 9476        href = obj.href
 9477        if href is not None:
 9478            writer.write_attribute('href', href)
 9479        if obj.value is not None:
 9480            Writer.write_string(writer, 'value', obj.value)
 9481        if obj.version is not None:
 9482            Writer.write_string(writer, 'version', obj.version)
 9483        writer.write_end()
 9484
 9485    @staticmethod
 9486    def write_many(objs, writer, singular=None, plural=None):
 9487        if singular is None:
 9488            singular = 'system_option_value'
 9489        if plural is None:
 9490            plural = 'system_option_values'
 9491        writer.write_start(plural)
 9492        if type(objs) == List:
 9493            href = objs.href
 9494            if href is not None:
 9495                writer.write_attribute('href', href)
 9496        for obj in objs:
 9497            SystemOptionValueWriter.write_one(obj, writer, singular)
 9498        writer.write_end()
 9499
 9500
 9501class TagWriter(Writer):
 9502
 9503    def __init__(self):
 9504        super(TagWriter, self).__init__()
 9505
 9506    @staticmethod
 9507    def write_one(obj, writer, singular=None):
 9508        if singular is None:
 9509            singular = 'tag'
 9510        writer.write_start(singular)
 9511        href = obj.href
 9512        if href is not None:
 9513            writer.write_attribute('href', href)
 9514        if obj.id is not None:
 9515            writer.write_attribute('id', obj.id)
 9516        if obj.comment is not None:
 9517            Writer.write_string(writer, 'comment', obj.comment)
 9518        if obj.description is not None:
 9519            Writer.write_string(writer, 'description', obj.description)
 9520        if obj.name is not None:
 9521            Writer.write_string(writer, 'name', obj.name)
 9522        if obj.group is not None:
 9523            GroupWriter.write_one(obj.group, writer, 'group')
 9524        if obj.host is not None:
 9525            HostWriter.write_one(obj.host, writer, 'host')
 9526        if obj.parent is not None:
 9527            TagWriter.write_one(obj.parent, writer, 'parent')
 9528        if obj.template is not None:
 9529            TemplateWriter.write_one(obj.template, writer, 'template')
 9530        if obj.user is not None:
 9531            UserWriter.write_one(obj.user, writer, 'user')
 9532        if obj.vm is not None:
 9533            VmWriter.write_one(obj.vm, writer, 'vm')
 9534        writer.write_end()
 9535
 9536    @staticmethod
 9537    def write_many(objs, writer, singular=None, plural=None):
 9538        if singular is None:
 9539            singular = 'tag'
 9540        if plural is None:
 9541            plural = 'tags'
 9542        writer.write_start(plural)
 9543        if type(objs) == List:
 9544            href = objs.href
 9545            if href is not None:
 9546                writer.write_attribute('href', href)
 9547        for obj in objs:
 9548            TagWriter.write_one(obj, writer, singular)
 9549        writer.write_end()
 9550
 9551
 9552class TemplateWriter(Writer):
 9553
 9554    def __init__(self):
 9555        super(TemplateWriter, self).__init__()
 9556
 9557    @staticmethod
 9558    def write_one(obj, writer, singular=None):
 9559        if singular is None:
 9560            singular = 'template'
 9561        writer.write_start(singular)
 9562        href = obj.href
 9563        if href is not None:
 9564            writer.write_attribute('href', href)
 9565        if obj.id is not None:
 9566            writer.write_attribute('id', obj.id)
 9567        if obj.auto_pinning_policy is not None:
 9568            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
 9569        if obj.bios is not None:
 9570            BiosWriter.write_one(obj.bios, writer, 'bios')
 9571        if obj.comment is not None:
 9572            Writer.write_string(writer, 'comment', obj.comment)
 9573        if obj.console is not None:
 9574            ConsoleWriter.write_one(obj.console, writer, 'console')
 9575        if obj.cpu is not None:
 9576            CpuWriter.write_one(obj.cpu, writer, 'cpu')
 9577        if obj.cpu_pinning_policy is not None:
 9578            Writer.write_string(writer, 'cpu_pinning_policy', obj.cpu_pinning_policy.value)
 9579        if obj.cpu_shares is not None:
 9580            Writer.write_integer(writer, 'cpu_shares', obj.cpu_shares)
 9581        if obj.creation_time is not None:
 9582            Writer.write_date(writer, 'creation_time', obj.creation_time)
 9583        if obj.custom_compatibility_version is not None:
 9584            VersionWriter.write_one(obj.custom_compatibility_version, writer, 'custom_compatibility_version')
 9585        if obj.custom_cpu_model is not None:
 9586            Writer.write_string(writer, 'custom_cpu_model', obj.custom_cpu_model)
 9587        if obj.custom_emulated_machine is not None:
 9588            Writer.write_string(writer, 'custom_emulated_machine', obj.custom_emulated_machine)
 9589        if obj.custom_properties is not None:
 9590            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
 9591        if obj.delete_protected is not None:
 9592            Writer.write_boolean(writer, 'delete_protected', obj.delete_protected)
 9593        if obj.description is not None:
 9594            Writer.write_string(writer, 'description', obj.description)
 9595        if obj.display is not None:
 9596            DisplayWriter.write_one(obj.display, writer, 'display')
 9597        if obj.domain is not None:
 9598            DomainWriter.write_one(obj.domain, writer, 'domain')
 9599        if obj.high_availability is not None:
 9600            HighAvailabilityWriter.write_one(obj.high_availability, writer, 'high_availability')
 9601        if obj.initialization is not None:
 9602            InitializationWriter.write_one(obj.initialization, writer, 'initialization')
 9603        if obj.io is not None:
 9604            IoWriter.write_one(obj.io, writer, 'io')
 9605        if obj.large_icon is not None:
 9606            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
 9607        if obj.lease is not None:
 9608            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
 9609        if obj.memory is not None:
 9610            Writer.write_integer(writer, 'memory', obj.memory)
 9611        if obj.memory_policy is not None:
 9612            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
 9613        if obj.migration is not None:
 9614            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
 9615        if obj.migration_downtime is not None:
 9616            Writer.write_integer(writer, 'migration_downtime', obj.migration_downtime)
 9617        if obj.multi_queues_enabled is not None:
 9618            Writer.write_boolean(writer, 'multi_queues_enabled', obj.multi_queues_enabled)
 9619        if obj.name is not None:
 9620            Writer.write_string(writer, 'name', obj.name)
 9621        if obj.origin is not None:
 9622            Writer.write_string(writer, 'origin', obj.origin)
 9623        if obj.os is not None:
 9624            OperatingSystemWriter.write_one(obj.os, writer, 'os')
 9625        if obj.placement_policy is not None:
 9626            VmPlacementPolicyWriter.write_one(obj.placement_policy, writer, 'placement_policy')
 9627        if obj.rng_device is not None:
 9628            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
 9629        if obj.serial_number is not None:
 9630            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
 9631        if obj.small_icon is not None:
 9632            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
 9633        if obj.soundcard_enabled is not None:
 9634            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
 9635        if obj.sso is not None:
 9636            SsoWriter.write_one(obj.sso, writer, 'sso')
 9637        if obj.start_paused is not None:
 9638            Writer.write_boolean(writer, 'start_paused', obj.start_paused)
 9639        if obj.stateless is not None:
 9640            Writer.write_boolean(writer, 'stateless', obj.stateless)
 9641        if obj.status is not None:
 9642            Writer.write_string(writer, 'status', obj.status.value)
 9643        if obj.storage_error_resume_behaviour is not None:
 9644            Writer.write_string(writer, 'storage_error_resume_behaviour', obj.storage_error_resume_behaviour.value)
 9645        if obj.time_zone is not None:
 9646            TimeZoneWriter.write_one(obj.time_zone, writer, 'time_zone')
 9647        if obj.tpm_enabled is not None:
 9648            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
 9649        if obj.tunnel_migration is not None:
 9650            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
 9651        if obj.type is not None:
 9652            Writer.write_string(writer, 'type', obj.type.value)
 9653        if obj.usb is not None:
 9654            UsbWriter.write_one(obj.usb, writer, 'usb')
 9655        if obj.version is not None:
 9656            TemplateVersionWriter.write_one(obj.version, writer, 'version')
 9657        if obj.virtio_scsi is not None:
 9658            VirtioScsiWriter.write_one(obj.virtio_scsi, writer, 'virtio_scsi')
 9659        if obj.virtio_scsi_multi_queues is not None:
 9660            Writer.write_integer(writer, 'virtio_scsi_multi_queues', obj.virtio_scsi_multi_queues)
 9661        if obj.virtio_scsi_multi_queues_enabled is not None:
 9662            Writer.write_boolean(writer, 'virtio_scsi_multi_queues_enabled', obj.virtio_scsi_multi_queues_enabled)
 9663        if obj.vm is not None:
 9664            VmWriter.write_one(obj.vm, writer, 'vm')
 9665        if obj.cdroms is not None:
 9666            CdromWriter.write_many(obj.cdroms, writer, 'cdrom', 'cdroms')
 9667        if obj.cluster is not None:
 9668            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
 9669        if obj.cpu_profile is not None:
 9670            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
 9671        if obj.disk_attachments is not None:
 9672            DiskAttachmentWriter.write_many(obj.disk_attachments, writer, 'disk_attachment', 'disk_attachments')
 9673        if obj.graphics_consoles is not None:
 9674            GraphicsConsoleWriter.write_many(obj.graphics_consoles, writer, 'graphics_console', 'graphics_consoles')
 9675        if obj.mediated_devices is not None:
 9676            VmMediatedDeviceWriter.write_many(obj.mediated_devices, writer, 'vm_mediated_device', 'mediated_devices')
 9677        if obj.nics is not None:
 9678            NicWriter.write_many(obj.nics, writer, 'nic', 'nics')
 9679        if obj.permissions is not None:
 9680            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 9681        if obj.quota is not None:
 9682            QuotaWriter.write_one(obj.quota, writer, 'quota')
 9683        if obj.storage_domain is not None:
 9684            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
 9685        if obj.tags is not None:
 9686            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
 9687        if obj.watchdogs is not None:
 9688            WatchdogWriter.write_many(obj.watchdogs, writer, 'watchdog', 'watchdogs')
 9689        writer.write_end()
 9690
 9691    @staticmethod
 9692    def write_many(objs, writer, singular=None, plural=None):
 9693        if singular is None:
 9694            singular = 'template'
 9695        if plural is None:
 9696            plural = 'templates'
 9697        writer.write_start(plural)
 9698        if type(objs) == List:
 9699            href = objs.href
 9700            if href is not None:
 9701                writer.write_attribute('href', href)
 9702        for obj in objs:
 9703            TemplateWriter.write_one(obj, writer, singular)
 9704        writer.write_end()
 9705
 9706
 9707class TemplateVersionWriter(Writer):
 9708
 9709    def __init__(self):
 9710        super(TemplateVersionWriter, self).__init__()
 9711
 9712    @staticmethod
 9713    def write_one(obj, writer, singular=None):
 9714        if singular is None:
 9715            singular = 'template_version'
 9716        writer.write_start(singular)
 9717        href = obj.href
 9718        if href is not None:
 9719            writer.write_attribute('href', href)
 9720        if obj.version_name is not None:
 9721            Writer.write_string(writer, 'version_name', obj.version_name)
 9722        if obj.version_number is not None:
 9723            Writer.write_integer(writer, 'version_number', obj.version_number)
 9724        if obj.base_template is not None:
 9725            TemplateWriter.write_one(obj.base_template, writer, 'base_template')
 9726        writer.write_end()
 9727
 9728    @staticmethod
 9729    def write_many(objs, writer, singular=None, plural=None):
 9730        if singular is None:
 9731            singular = 'template_version'
 9732        if plural is None:
 9733            plural = 'template_versions'
 9734        writer.write_start(plural)
 9735        if type(objs) == List:
 9736            href = objs.href
 9737            if href is not None:
 9738                writer.write_attribute('href', href)
 9739        for obj in objs:
 9740            TemplateVersionWriter.write_one(obj, writer, singular)
 9741        writer.write_end()
 9742
 9743
 9744class TicketWriter(Writer):
 9745
 9746    def __init__(self):
 9747        super(TicketWriter, self).__init__()
 9748
 9749    @staticmethod
 9750    def write_one(obj, writer, singular=None):
 9751        if singular is None:
 9752            singular = 'ticket'
 9753        writer.write_start(singular)
 9754        href = obj.href
 9755        if href is not None:
 9756            writer.write_attribute('href', href)
 9757        if obj.expiry is not None:
 9758            Writer.write_integer(writer, 'expiry', obj.expiry)
 9759        if obj.value is not None:
 9760            Writer.write_string(writer, 'value', obj.value)
 9761        writer.write_end()
 9762
 9763    @staticmethod
 9764    def write_many(objs, writer, singular=None, plural=None):
 9765        if singular is None:
 9766            singular = 'ticket'
 9767        if plural is None:
 9768            plural = 'tickets'
 9769        writer.write_start(plural)
 9770        if type(objs) == List:
 9771            href = objs.href
 9772            if href is not None:
 9773                writer.write_attribute('href', href)
 9774        for obj in objs:
 9775            TicketWriter.write_one(obj, writer, singular)
 9776        writer.write_end()
 9777
 9778
 9779class TimeZoneWriter(Writer):
 9780
 9781    def __init__(self):
 9782        super(TimeZoneWriter, self).__init__()
 9783
 9784    @staticmethod
 9785    def write_one(obj, writer, singular=None):
 9786        if singular is None:
 9787            singular = 'time_zone'
 9788        writer.write_start(singular)
 9789        href = obj.href
 9790        if href is not None:
 9791            writer.write_attribute('href', href)
 9792        if obj.name is not None:
 9793            Writer.write_string(writer, 'name', obj.name)
 9794        if obj.utc_offset is not None:
 9795            Writer.write_string(writer, 'utc_offset', obj.utc_offset)
 9796        writer.write_end()
 9797
 9798    @staticmethod
 9799    def write_many(objs, writer, singular=None, plural=None):
 9800        if singular is None:
 9801            singular = 'time_zone'
 9802        if plural is None:
 9803            plural = 'time_zones'
 9804        writer.write_start(plural)
 9805        if type(objs) == List:
 9806            href = objs.href
 9807            if href is not None:
 9808                writer.write_attribute('href', href)
 9809        for obj in objs:
 9810            TimeZoneWriter.write_one(obj, writer, singular)
 9811        writer.write_end()
 9812
 9813
 9814class TransparentHugePagesWriter(Writer):
 9815
 9816    def __init__(self):
 9817        super(TransparentHugePagesWriter, self).__init__()
 9818
 9819    @staticmethod
 9820    def write_one(obj, writer, singular=None):
 9821        if singular is None:
 9822            singular = 'transparent_hugepages'
 9823        writer.write_start(singular)
 9824        href = obj.href
 9825        if href is not None:
 9826            writer.write_attribute('href', href)
 9827        if obj.enabled is not None:
 9828            Writer.write_boolean(writer, 'enabled', obj.enabled)
 9829        writer.write_end()
 9830
 9831    @staticmethod
 9832    def write_many(objs, writer, singular=None, plural=None):
 9833        if singular is None:
 9834            singular = 'transparent_hugepages'
 9835        if plural is None:
 9836            plural = 'transparent_huge_pagess'
 9837        writer.write_start(plural)
 9838        if type(objs) == List:
 9839            href = objs.href
 9840            if href is not None:
 9841                writer.write_attribute('href', href)
 9842        for obj in objs:
 9843            TransparentHugePagesWriter.write_one(obj, writer, singular)
 9844        writer.write_end()
 9845
 9846
 9847class UnmanagedNetworkWriter(Writer):
 9848
 9849    def __init__(self):
 9850        super(UnmanagedNetworkWriter, self).__init__()
 9851
 9852    @staticmethod
 9853    def write_one(obj, writer, singular=None):
 9854        if singular is None:
 9855            singular = 'unmanaged_network'
 9856        writer.write_start(singular)
 9857        href = obj.href
 9858        if href is not None:
 9859            writer.write_attribute('href', href)
 9860        if obj.id is not None:
 9861            writer.write_attribute('id', obj.id)
 9862        if obj.comment is not None:
 9863            Writer.write_string(writer, 'comment', obj.comment)
 9864        if obj.description is not None:
 9865            Writer.write_string(writer, 'description', obj.description)
 9866        if obj.name is not None:
 9867            Writer.write_string(writer, 'name', obj.name)
 9868        if obj.host is not None:
 9869            HostWriter.write_one(obj.host, writer, 'host')
 9870        if obj.host_nic is not None:
 9871            HostNicWriter.write_one(obj.host_nic, writer, 'host_nic')
 9872        writer.write_end()
 9873
 9874    @staticmethod
 9875    def write_many(objs, writer, singular=None, plural=None):
 9876        if singular is None:
 9877            singular = 'unmanaged_network'
 9878        if plural is None:
 9879            plural = 'unmanaged_networks'
 9880        writer.write_start(plural)
 9881        if type(objs) == List:
 9882            href = objs.href
 9883            if href is not None:
 9884                writer.write_attribute('href', href)
 9885        for obj in objs:
 9886            UnmanagedNetworkWriter.write_one(obj, writer, singular)
 9887        writer.write_end()
 9888
 9889
 9890class UsbWriter(Writer):
 9891
 9892    def __init__(self):
 9893        super(UsbWriter, self).__init__()
 9894
 9895    @staticmethod
 9896    def write_one(obj, writer, singular=None):
 9897        if singular is None:
 9898            singular = 'usb'
 9899        writer.write_start(singular)
 9900        href = obj.href
 9901        if href is not None:
 9902            writer.write_attribute('href', href)
 9903        if obj.enabled is not None:
 9904            Writer.write_boolean(writer, 'enabled', obj.enabled)
 9905        if obj.type is not None:
 9906            Writer.write_string(writer, 'type', obj.type.value)
 9907        writer.write_end()
 9908
 9909    @staticmethod
 9910    def write_many(objs, writer, singular=None, plural=None):
 9911        if singular is None:
 9912            singular = 'usb'
 9913        if plural is None:
 9914            plural = 'usbs'
 9915        writer.write_start(plural)
 9916        if type(objs) == List:
 9917            href = objs.href
 9918            if href is not None:
 9919                writer.write_attribute('href', href)
 9920        for obj in objs:
 9921            UsbWriter.write_one(obj, writer, singular)
 9922        writer.write_end()
 9923
 9924
 9925class UserWriter(Writer):
 9926
 9927    def __init__(self):
 9928        super(UserWriter, self).__init__()
 9929
 9930    @staticmethod
 9931    def write_one(obj, writer, singular=None):
 9932        if singular is None:
 9933            singular = 'user'
 9934        writer.write_start(singular)
 9935        href = obj.href
 9936        if href is not None:
 9937            writer.write_attribute('href', href)
 9938        if obj.id is not None:
 9939            writer.write_attribute('id', obj.id)
 9940        if obj.comment is not None:
 9941            Writer.write_string(writer, 'comment', obj.comment)
 9942        if obj.department is not None:
 9943            Writer.write_string(writer, 'department', obj.department)
 9944        if obj.description is not None:
 9945            Writer.write_string(writer, 'description', obj.description)
 9946        if obj.domain_entry_id is not None:
 9947            Writer.write_string(writer, 'domain_entry_id', obj.domain_entry_id)
 9948        if obj.email is not None:
 9949            Writer.write_string(writer, 'email', obj.email)
 9950        if obj.last_name is not None:
 9951            Writer.write_string(writer, 'last_name', obj.last_name)
 9952        if obj.logged_in is not None:
 9953            Writer.write_boolean(writer, 'logged_in', obj.logged_in)
 9954        if obj.name is not None:
 9955            Writer.write_string(writer, 'name', obj.name)
 9956        if obj.namespace is not None:
 9957            Writer.write_string(writer, 'namespace', obj.namespace)
 9958        if obj.password is not None:
 9959            Writer.write_string(writer, 'password', obj.password)
 9960        if obj.principal is not None:
 9961            Writer.write_string(writer, 'principal', obj.principal)
 9962        if obj.user_name is not None:
 9963            Writer.write_string(writer, 'user_name', obj.user_name)
 9964        if obj.user_options is not None:
 9965            PropertyWriter.write_many(obj.user_options, writer, 'property', 'user_options')
 9966        if obj.domain is not None:
 9967            DomainWriter.write_one(obj.domain, writer, 'domain')
 9968        if obj.groups is not None:
 9969            GroupWriter.write_many(obj.groups, writer, 'group', 'groups')
 9970        if obj.options is not None:
 9971            UserOptionWriter.write_many(obj.options, writer, 'user_option', 'options')
 9972        if obj.permissions is not None:
 9973            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
 9974        if obj.roles is not None:
 9975            RoleWriter.write_many(obj.roles, writer, 'role', 'roles')
 9976        if obj.ssh_public_keys is not None:
 9977            SshPublicKeyWriter.write_many(obj.ssh_public_keys, writer, 'ssh_public_key', 'ssh_public_keys')
 9978        if obj.tags is not None:
 9979            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
 9980        writer.write_end()
 9981
 9982    @staticmethod
 9983    def write_many(objs, writer, singular=None, plural=None):
 9984        if singular is None:
 9985            singular = 'user'
 9986        if plural is None:
 9987            plural = 'users'
 9988        writer.write_start(plural)
 9989        if type(objs) == List:
 9990            href = objs.href
 9991            if href is not None:
 9992                writer.write_attribute('href', href)
 9993        for obj in objs:
 9994            UserWriter.write_one(obj, writer, singular)
 9995        writer.write_end()
 9996
 9997
 9998class UserOptionWriter(Writer):
 9999
10000    def __init__(self):
10001        super(UserOptionWriter, self).__init__()
10002
10003    @staticmethod
10004    def write_one(obj, writer, singular=None):
10005        if singular is None:
10006            singular = 'user_option'
10007        writer.write_start(singular)
10008        href = obj.href
10009        if href is not None:
10010            writer.write_attribute('href', href)
10011        if obj.id is not None:
10012            writer.write_attribute('id', obj.id)
10013        if obj.comment is not None:
10014            Writer.write_string(writer, 'comment', obj.comment)
10015        if obj.content is not None:
10016            Writer.write_string(writer, 'content', obj.content)
10017        if obj.description is not None:
10018            Writer.write_string(writer, 'description', obj.description)
10019        if obj.name is not None:
10020            Writer.write_string(writer, 'name', obj.name)
10021        if obj.user is not None:
10022            UserWriter.write_one(obj.user, writer, 'user')
10023        writer.write_end()
10024
10025    @staticmethod
10026    def write_many(objs, writer, singular=None, plural=None):
10027        if singular is None:
10028            singular = 'user_option'
10029        if plural is None:
10030            plural = 'user_options'
10031        writer.write_start(plural)
10032        if type(objs) == List:
10033            href = objs.href
10034            if href is not None:
10035                writer.write_attribute('href', href)
10036        for obj in objs:
10037            UserOptionWriter.write_one(obj, writer, singular)
10038        writer.write_end()
10039
10040
10041class ValueWriter(Writer):
10042
10043    def __init__(self):
10044        super(ValueWriter, self).__init__()
10045
10046    @staticmethod
10047    def write_one(obj, writer, singular=None):
10048        if singular is None:
10049            singular = 'value'
10050        writer.write_start(singular)
10051        href = obj.href
10052        if href is not None:
10053            writer.write_attribute('href', href)
10054        if obj.datum is not None:
10055            Writer.write_decimal(writer, 'datum', obj.datum)
10056        if obj.detail is not None:
10057            Writer.write_string(writer, 'detail', obj.detail)
10058        writer.write_end()
10059
10060    @staticmethod
10061    def write_many(objs, writer, singular=None, plural=None):
10062        if singular is None:
10063            singular = 'value'
10064        if plural is None:
10065            plural = 'values'
10066        writer.write_start(plural)
10067        if type(objs) == List:
10068            href = objs.href
10069            if href is not None:
10070                writer.write_attribute('href', href)
10071        for obj in objs:
10072            ValueWriter.write_one(obj, writer, singular)
10073        writer.write_end()
10074
10075
10076class VcpuPinWriter(Writer):
10077
10078    def __init__(self):
10079        super(VcpuPinWriter, self).__init__()
10080
10081    @staticmethod
10082    def write_one(obj, writer, singular=None):
10083        if singular is None:
10084            singular = 'vcpu_pin'
10085        writer.write_start(singular)
10086        href = obj.href
10087        if href is not None:
10088            writer.write_attribute('href', href)
10089        if obj.cpu_set is not None:
10090            Writer.write_string(writer, 'cpu_set', obj.cpu_set)
10091        if obj.vcpu is not None:
10092            Writer.write_integer(writer, 'vcpu', obj.vcpu)
10093        writer.write_end()
10094
10095    @staticmethod
10096    def write_many(objs, writer, singular=None, plural=None):
10097        if singular is None:
10098            singular = 'vcpu_pin'
10099        if plural is None:
10100            plural = 'vcpu_pins'
10101        writer.write_start(plural)
10102        if type(objs) == List:
10103            href = objs.href
10104            if href is not None:
10105                writer.write_attribute('href', href)
10106        for obj in objs:
10107            VcpuPinWriter.write_one(obj, writer, singular)
10108        writer.write_end()
10109
10110
10111class VendorWriter(Writer):
10112
10113    def __init__(self):
10114        super(VendorWriter, self).__init__()
10115
10116    @staticmethod
10117    def write_one(obj, writer, singular=None):
10118        if singular is None:
10119            singular = 'vendor'
10120        writer.write_start(singular)
10121        href = obj.href
10122        if href is not None:
10123            writer.write_attribute('href', href)
10124        if obj.id is not None:
10125            writer.write_attribute('id', obj.id)
10126        if obj.comment is not None:
10127            Writer.write_string(writer, 'comment', obj.comment)
10128        if obj.description is not None:
10129            Writer.write_string(writer, 'description', obj.description)
10130        if obj.name is not None:
10131            Writer.write_string(writer, 'name', obj.name)
10132        writer.write_end()
10133
10134    @staticmethod
10135    def write_many(objs, writer, singular=None, plural=None):
10136        if singular is None:
10137            singular = 'vendor'
10138        if plural is None:
10139            plural = 'vendors'
10140        writer.write_start(plural)
10141        if type(objs) == List:
10142            href = objs.href
10143            if href is not None:
10144                writer.write_attribute('href', href)
10145        for obj in objs:
10146            VendorWriter.write_one(obj, writer, singular)
10147        writer.write_end()
10148
10149
10150class VersionWriter(Writer):
10151
10152    def __init__(self):
10153        super(VersionWriter, self).__init__()
10154
10155    @staticmethod
10156    def write_one(obj, writer, singular=None):
10157        if singular is None:
10158            singular = 'version'
10159        writer.write_start(singular)
10160        href = obj.href
10161        if href is not None:
10162            writer.write_attribute('href', href)
10163        if obj.id is not None:
10164            writer.write_attribute('id', obj.id)
10165        if obj.build is not None:
10166            Writer.write_integer(writer, 'build', obj.build)
10167        if obj.comment is not None:
10168            Writer.write_string(writer, 'comment', obj.comment)
10169        if obj.description is not None:
10170            Writer.write_string(writer, 'description', obj.description)
10171        if obj.full_version is not None:
10172            Writer.write_string(writer, 'full_version', obj.full_version)
10173        if obj.major is not None:
10174            Writer.write_integer(writer, 'major', obj.major)
10175        if obj.minor is not None:
10176            Writer.write_integer(writer, 'minor', obj.minor)
10177        if obj.name is not None:
10178            Writer.write_string(writer, 'name', obj.name)
10179        if obj.revision is not None:
10180            Writer.write_integer(writer, 'revision', obj.revision)
10181        writer.write_end()
10182
10183    @staticmethod
10184    def write_many(objs, writer, singular=None, plural=None):
10185        if singular is None:
10186            singular = 'version'
10187        if plural is None:
10188            plural = 'versions'
10189        writer.write_start(plural)
10190        if type(objs) == List:
10191            href = objs.href
10192            if href is not None:
10193                writer.write_attribute('href', href)
10194        for obj in objs:
10195            VersionWriter.write_one(obj, writer, singular)
10196        writer.write_end()
10197
10198
10199class VirtioScsiWriter(Writer):
10200
10201    def __init__(self):
10202        super(VirtioScsiWriter, self).__init__()
10203
10204    @staticmethod
10205    def write_one(obj, writer, singular=None):
10206        if singular is None:
10207            singular = 'virtio_scsi'
10208        writer.write_start(singular)
10209        href = obj.href
10210        if href is not None:
10211            writer.write_attribute('href', href)
10212        if obj.enabled is not None:
10213            Writer.write_boolean(writer, 'enabled', obj.enabled)
10214        writer.write_end()
10215
10216    @staticmethod
10217    def write_many(objs, writer, singular=None, plural=None):
10218        if singular is None:
10219            singular = 'virtio_scsi'
10220        if plural is None:
10221            plural = 'virtio_scsis'
10222        writer.write_start(plural)
10223        if type(objs) == List:
10224            href = objs.href
10225            if href is not None:
10226                writer.write_attribute('href', href)
10227        for obj in objs:
10228            VirtioScsiWriter.write_one(obj, writer, singular)
10229        writer.write_end()
10230
10231
10232class VirtualNumaNodeWriter(Writer):
10233
10234    def __init__(self):
10235        super(VirtualNumaNodeWriter, self).__init__()
10236
10237    @staticmethod
10238    def write_one(obj, writer, singular=None):
10239        if singular is None:
10240            singular = 'vm_numa_node'
10241        writer.write_start(singular)
10242        href = obj.href
10243        if href is not None:
10244            writer.write_attribute('href', href)
10245        if obj.id is not None:
10246            writer.write_attribute('id', obj.id)
10247        if obj.comment is not None:
10248            Writer.write_string(writer, 'comment', obj.comment)
10249        if obj.cpu is not None:
10250            CpuWriter.write_one(obj.cpu, writer, 'cpu')
10251        if obj.description is not None:
10252            Writer.write_string(writer, 'description', obj.description)
10253        if obj.index is not None:
10254            Writer.write_integer(writer, 'index', obj.index)
10255        if obj.memory is not None:
10256            Writer.write_integer(writer, 'memory', obj.memory)
10257        if obj.name is not None:
10258            Writer.write_string(writer, 'name', obj.name)
10259        if obj.node_distance is not None:
10260            Writer.write_string(writer, 'node_distance', obj.node_distance)
10261        if obj.numa_node_pins is not None:
10262            NumaNodePinWriter.write_many(obj.numa_node_pins, writer, 'numa_node_pin', 'numa_node_pins')
10263        if obj.numa_tune_mode is not None:
10264            Writer.write_string(writer, 'numa_tune_mode', obj.numa_tune_mode.value)
10265        if obj.host is not None:
10266            HostWriter.write_one(obj.host, writer, 'host')
10267        if obj.statistics is not None:
10268            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
10269        if obj.vm is not None:
10270            VmWriter.write_one(obj.vm, writer, 'vm')
10271        writer.write_end()
10272
10273    @staticmethod
10274    def write_many(objs, writer, singular=None, plural=None):
10275        if singular is None:
10276            singular = 'vm_numa_node'
10277        if plural is None:
10278            plural = 'vm_numa_nodes'
10279        writer.write_start(plural)
10280        if type(objs) == List:
10281            href = objs.href
10282            if href is not None:
10283                writer.write_attribute('href', href)
10284        for obj in objs:
10285            VirtualNumaNodeWriter.write_one(obj, writer, singular)
10286        writer.write_end()
10287
10288
10289class VlanWriter(Writer):
10290
10291    def __init__(self):
10292        super(VlanWriter, self).__init__()
10293
10294    @staticmethod
10295    def write_one(obj, writer, singular=None):
10296        if singular is None:
10297            singular = 'vlan'
10298        writer.write_start(singular)
10299        href = obj.href
10300        if href is not None:
10301            writer.write_attribute('href', href)
10302        if obj.id is not None:
10303            writer.write_attribute('id', str(obj.id))
10304        writer.write_end()
10305
10306    @staticmethod
10307    def write_many(objs, writer, singular=None, plural=None):
10308        if singular is None:
10309            singular = 'vlan'
10310        if plural is None:
10311            plural = 'vlans'
10312        writer.write_start(plural)
10313        if type(objs) == List:
10314            href = objs.href
10315            if href is not None:
10316                writer.write_attribute('href', href)
10317        for obj in objs:
10318            VlanWriter.write_one(obj, writer, singular)
10319        writer.write_end()
10320
10321
10322class VmWriter(Writer):
10323
10324    def __init__(self):
10325        super(VmWriter, self).__init__()
10326
10327    @staticmethod
10328    def write_one(obj, writer, singular=None):
10329        if singular is None:
10330            singular = 'vm'
10331        writer.write_start(singular)
10332        href = obj.href
10333        if href is not None:
10334            writer.write_attribute('href', href)
10335        if obj.id is not None:
10336            writer.write_attribute('id', obj.id)
10337        if obj.auto_pinning_policy is not None:
10338            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
10339        if obj.bios is not None:
10340            BiosWriter.write_one(obj.bios, writer, 'bios')
10341        if obj.comment is not None:
10342            Writer.write_string(writer, 'comment', obj.comment)
10343        if obj.console is not None:
10344            ConsoleWriter.write_one(obj.console, writer, 'console')
10345        if obj.cpu is not None:
10346            CpuWriter.write_one(obj.cpu, writer, 'cpu')
10347        if obj.cpu_pinning_policy is not None:
10348            Writer.write_string(writer, 'cpu_pinning_policy', obj.cpu_pinning_policy.value)
10349        if obj.cpu_shares is not None:
10350            Writer.write_integer(writer, 'cpu_shares', obj.cpu_shares)
10351        if obj.creation_time is not None:
10352            Writer.write_date(writer, 'creation_time', obj.creation_time)
10353        if obj.custom_compatibility_version is not None:
10354            VersionWriter.write_one(obj.custom_compatibility_version, writer, 'custom_compatibility_version')
10355        if obj.custom_cpu_model is not None:
10356            Writer.write_string(writer, 'custom_cpu_model', obj.custom_cpu_model)
10357        if obj.custom_emulated_machine is not None:
10358            Writer.write_string(writer, 'custom_emulated_machine', obj.custom_emulated_machine)
10359        if obj.custom_properties is not None:
10360            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
10361        if obj.delete_protected is not None:
10362            Writer.write_boolean(writer, 'delete_protected', obj.delete_protected)
10363        if obj.description is not None:
10364            Writer.write_string(writer, 'description', obj.description)
10365        if obj.display is not None:
10366            DisplayWriter.write_one(obj.display, writer, 'display')
10367        if obj.domain is not None:
10368            DomainWriter.write_one(obj.domain, writer, 'domain')
10369        if obj.fqdn is not None:
10370            Writer.write_string(writer, 'fqdn', obj.fqdn)
10371        if obj.guest_operating_system is not None:
10372            GuestOperatingSystemWriter.write_one(obj.guest_operating_system, writer, 'guest_operating_system')
10373        if obj.guest_time_zone is not None:
10374            TimeZoneWriter.write_one(obj.guest_time_zone, writer, 'guest_time_zone')
10375        if obj.has_illegal_images is not None:
10376            Writer.write_boolean(writer, 'has_illegal_images', obj.has_illegal_images)
10377        if obj.high_availability is not None:
10378            HighAvailabilityWriter.write_one(obj.high_availability, writer, 'high_availability')
10379        if obj.initialization is not None:
10380            InitializationWriter.write_one(obj.initialization, writer, 'initialization')
10381        if obj.io is not None:
10382            IoWriter.write_one(obj.io, writer, 'io')
10383        if obj.large_icon is not None:
10384            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
10385        if obj.lease is not None:
10386            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
10387        if obj.memory is not None:
10388            Writer.write_integer(writer, 'memory', obj.memory)
10389        if obj.memory_policy is not None:
10390            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
10391        if obj.migration is not None:
10392            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
10393        if obj.migration_downtime is not None:
10394            Writer.write_integer(writer, 'migration_downtime', obj.migration_downtime)
10395        if obj.multi_queues_enabled is not None:
10396            Writer.write_boolean(writer, 'multi_queues_enabled', obj.multi_queues_enabled)
10397        if obj.name is not None:
10398            Writer.write_string(writer, 'name', obj.name)
10399        if obj.next_run_configuration_exists is not None:
10400            Writer.write_boolean(writer, 'next_run_configuration_exists', obj.next_run_configuration_exists)
10401        if obj.numa_tune_mode is not None:
10402            Writer.write_string(writer, 'numa_tune_mode', obj.numa_tune_mode.value)
10403        if obj.origin is not None:
10404            Writer.write_string(writer, 'origin', obj.origin)
10405        if obj.os is not None:
10406            OperatingSystemWriter.write_one(obj.os, writer, 'os')
10407        if obj.payloads is not None:
10408            PayloadWriter.write_many(obj.payloads, writer, 'payload', 'payloads')
10409        if obj.placement_policy is not None:
10410            VmPlacementPolicyWriter.write_one(obj.placement_policy, writer, 'placement_policy')
10411        if obj.rng_device is not None:
10412            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
10413        if obj.run_once is not None:
10414            Writer.write_boolean(writer, 'run_once', obj.run_once)
10415        if obj.serial_number is not None:
10416            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
10417        if obj.small_icon is not None:
10418            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
10419        if obj.soundcard_enabled is not None:
10420            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
10421        if obj.sso is not None:
10422            SsoWriter.write_one(obj.sso, writer, 'sso')
10423        if obj.start_paused is not None:
10424            Writer.write_boolean(writer, 'start_paused', obj.start_paused)
10425        if obj.start_time is not None:
10426            Writer.write_date(writer, 'start_time', obj.start_time)
10427        if obj.stateless is not None:
10428            Writer.write_boolean(writer, 'stateless', obj.stateless)
10429        if obj.status is not None:
10430            Writer.write_string(writer, 'status', obj.status.value)
10431        if obj.status_detail is not None:
10432            Writer.write_string(writer, 'status_detail', obj.status_detail)
10433        if obj.stop_reason is not None:
10434            Writer.write_string(writer, 'stop_reason', obj.stop_reason)
10435        if obj.stop_time is not None:
10436            Writer.write_date(writer, 'stop_time', obj.stop_time)
10437        if obj.storage_error_resume_behaviour is not None:
10438            Writer.write_string(writer, 'storage_error_resume_behaviour', obj.storage_error_resume_behaviour.value)
10439        if obj.time_zone is not None:
10440            TimeZoneWriter.write_one(obj.time_zone, writer, 'time_zone')
10441        if obj.tpm_enabled is not None:
10442            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
10443        if obj.tunnel_migration is not None:
10444            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
10445        if obj.type is not None:
10446            Writer.write_string(writer, 'type', obj.type.value)
10447        if obj.usb is not None:
10448            UsbWriter.write_one(obj.usb, writer, 'usb')
10449        if obj.use_latest_template_version is not None:
10450            Writer.write_boolean(writer, 'use_latest_template_version', obj.use_latest_template_version)
10451        if obj.virtio_scsi is not None:
10452            VirtioScsiWriter.write_one(obj.virtio_scsi, writer, 'virtio_scsi')
10453        if obj.virtio_scsi_multi_queues is not None:
10454            Writer.write_integer(writer, 'virtio_scsi_multi_queues', obj.virtio_scsi_multi_queues)
10455        if obj.virtio_scsi_multi_queues_enabled is not None:
10456            Writer.write_boolean(writer, 'virtio_scsi_multi_queues_enabled', obj.virtio_scsi_multi_queues_enabled)
10457        if obj.affinity_labels is not None:
10458            AffinityLabelWriter.write_many(obj.affinity_labels, writer, 'affinity_label', 'affinity_labels')
10459        if obj.applications is not None:
10460            ApplicationWriter.write_many(obj.applications, writer, 'application', 'applications')
10461        if obj.cdroms is not None:
10462            CdromWriter.write_many(obj.cdroms, writer, 'cdrom', 'cdroms')
10463        if obj.cluster is not None:
10464            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
10465        if obj.cpu_profile is not None:
10466            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
10467        if obj.disk_attachments is not None:
10468            DiskAttachmentWriter.write_many(obj.disk_attachments, writer, 'disk_attachment', 'disk_attachments')
10469        if obj.dynamic_cpu is not None:
10470            DynamicCpuWriter.write_one(obj.dynamic_cpu, writer, 'dynamic_cpu')
10471        if obj.external_host_provider is not None:
10472            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
10473        if obj.floppies is not None:
10474            FloppyWriter.write_many(obj.floppies, writer, 'floppy', 'floppies')
10475        if obj.graphics_consoles is not None:
10476            GraphicsConsoleWriter.write_many(obj.graphics_consoles, writer, 'graphics_console', 'graphics_consoles')
10477        if obj.host is not None:
10478            HostWriter.write_one(obj.host, writer, 'host')
10479        if obj.host_devices is not None:
10480            HostDeviceWriter.write_many(obj.host_devices, writer, 'host_device', 'host_devices')
10481        if obj.instance_type is not None:
10482            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
10483        if obj.katello_errata is not None:
10484            KatelloErratumWriter.write_many(obj.katello_errata, writer, 'katello_erratum', 'katello_errata')
10485        if obj.mediated_devices is not None:
10486            VmMediatedDeviceWriter.write_many(obj.mediated_devices, writer, 'vm_mediated_device', 'mediated_devices')
10487        if obj.nics is not None:
10488            NicWriter.write_many(obj.nics, writer, 'nic', 'nics')
10489        if obj.numa_nodes is not None:
10490            NumaNodeWriter.write_many(obj.numa_nodes, writer, 'host_numa_node', 'host_numa_nodes')
10491        if obj.original_template is not None:
10492            TemplateWriter.write_one(obj.original_template, writer, 'original_template')
10493        if obj.permissions is not None:
10494            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
10495        if obj.quota is not None:
10496            QuotaWriter.write_one(obj.quota, writer, 'quota')
10497        if obj.reported_devices is not None:
10498            ReportedDeviceWriter.write_many(obj.reported_devices, writer, 'reported_device', 'reported_devices')
10499        if obj.sessions is not None:
10500            SessionWriter.write_many(obj.sessions, writer, 'session', 'sessions')
10501        if obj.snapshots is not None:
10502            SnapshotWriter.write_many(obj.snapshots, writer, 'snapshot', 'snapshots')
10503        if obj.statistics is not None:
10504            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
10505        if obj.storage_domain is not None:
10506            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
10507        if obj.tags is not None:
10508            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
10509        if obj.template is not None:
10510            TemplateWriter.write_one(obj.template, writer, 'template')
10511        if obj.vm_pool is not None:
10512            VmPoolWriter.write_one(obj.vm_pool, writer, 'vm_pool')
10513        if obj.watchdogs is not None:
10514            WatchdogWriter.write_many(obj.watchdogs, writer, 'watchdog', 'watchdogs')
10515        writer.write_end()
10516
10517    @staticmethod
10518    def write_many(objs, writer, singular=None, plural=None):
10519        if singular is None:
10520            singular = 'vm'
10521        if plural is None:
10522            plural = 'vms'
10523        writer.write_start(plural)
10524        if type(objs) == List:
10525            href = objs.href
10526            if href is not None:
10527                writer.write_attribute('href', href)
10528        for obj in objs:
10529            VmWriter.write_one(obj, writer, singular)
10530        writer.write_end()
10531
10532
10533class VmBaseWriter(Writer):
10534
10535    def __init__(self):
10536        super(VmBaseWriter, self).__init__()
10537
10538    @staticmethod
10539    def write_one(obj, writer, singular=None):
10540        if singular is None:
10541            singular = 'vm_base'
10542        writer.write_start(singular)
10543        href = obj.href
10544        if href is not None:
10545            writer.write_attribute('href', href)
10546        if obj.id is not None:
10547            writer.write_attribute('id', obj.id)
10548        if obj.auto_pinning_policy is not None:
10549            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
10550        if obj.bios is not None:
10551            BiosWriter.write_one(obj.bios, writer, 'bios')
10552        if obj.comment is not None:
10553            Writer.write_string(writer, 'comment', obj.comment)
10554        if obj.console is not None:
10555            ConsoleWriter.write_one(obj.console, writer, 'console')
10556        if obj.cpu is not None:
10557            CpuWriter.write_one(obj.cpu, writer, 'cpu')
10558        if obj.cpu_pinning_policy is not None:
10559            Writer.write_string(writer, 'cpu_pinning_policy', obj.cpu_pinning_policy.value)
10560        if obj.cpu_shares is not None:
10561            Writer.write_integer(writer, 'cpu_shares', obj.cpu_shares)
10562        if obj.creation_time is not None:
10563            Writer.write_date(writer, 'creation_time', obj.creation_time)
10564        if obj.custom_compatibility_version is not None:
10565            VersionWriter.write_one(obj.custom_compatibility_version, writer, 'custom_compatibility_version')
10566        if obj.custom_cpu_model is not None:
10567            Writer.write_string(writer, 'custom_cpu_model', obj.custom_cpu_model)
10568        if obj.custom_emulated_machine is not None:
10569            Writer.write_string(writer, 'custom_emulated_machine', obj.custom_emulated_machine)
10570        if obj.custom_properties is not None:
10571            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
10572        if obj.delete_protected is not None:
10573            Writer.write_boolean(writer, 'delete_protected', obj.delete_protected)
10574        if obj.description is not None:
10575            Writer.write_string(writer, 'description', obj.description)
10576        if obj.display is not None:
10577            DisplayWriter.write_one(obj.display, writer, 'display')
10578        if obj.domain is not None:
10579            DomainWriter.write_one(obj.domain, writer, 'domain')
10580        if obj.high_availability is not None:
10581            HighAvailabilityWriter.write_one(obj.high_availability, writer, 'high_availability')
10582        if obj.initialization is not None:
10583            InitializationWriter.write_one(obj.initialization, writer, 'initialization')
10584        if obj.io is not None:
10585            IoWriter.write_one(obj.io, writer, 'io')
10586        if obj.large_icon is not None:
10587            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
10588        if obj.lease is not None:
10589            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
10590        if obj.memory is not None:
10591            Writer.write_integer(writer, 'memory', obj.memory)
10592        if obj.memory_policy is not None:
10593            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
10594        if obj.migration is not None:
10595            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
10596        if obj.migration_downtime is not None:
10597            Writer.write_integer(writer, 'migration_downtime', obj.migration_downtime)
10598        if obj.multi_queues_enabled is not None:
10599            Writer.write_boolean(writer, 'multi_queues_enabled', obj.multi_queues_enabled)
10600        if obj.name is not None:
10601            Writer.write_string(writer, 'name', obj.name)
10602        if obj.origin is not None:
10603            Writer.write_string(writer, 'origin', obj.origin)
10604        if obj.os is not None:
10605            OperatingSystemWriter.write_one(obj.os, writer, 'os')
10606        if obj.placement_policy is not None:
10607            VmPlacementPolicyWriter.write_one(obj.placement_policy, writer, 'placement_policy')
10608        if obj.rng_device is not None:
10609            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
10610        if obj.serial_number is not None:
10611            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
10612        if obj.small_icon is not None:
10613            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
10614        if obj.soundcard_enabled is not None:
10615            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
10616        if obj.sso is not None:
10617            SsoWriter.write_one(obj.sso, writer, 'sso')
10618        if obj.start_paused is not None:
10619            Writer.write_boolean(writer, 'start_paused', obj.start_paused)
10620        if obj.stateless is not None:
10621            Writer.write_boolean(writer, 'stateless', obj.stateless)
10622        if obj.storage_error_resume_behaviour is not None:
10623            Writer.write_string(writer, 'storage_error_resume_behaviour', obj.storage_error_resume_behaviour.value)
10624        if obj.time_zone is not None:
10625            TimeZoneWriter.write_one(obj.time_zone, writer, 'time_zone')
10626        if obj.tpm_enabled is not None:
10627            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
10628        if obj.tunnel_migration is not None:
10629            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
10630        if obj.type is not None:
10631            Writer.write_string(writer, 'type', obj.type.value)
10632        if obj.usb is not None:
10633            UsbWriter.write_one(obj.usb, writer, 'usb')
10634        if obj.virtio_scsi is not None:
10635            VirtioScsiWriter.write_one(obj.virtio_scsi, writer, 'virtio_scsi')
10636        if obj.virtio_scsi_multi_queues is not None:
10637            Writer.write_integer(writer, 'virtio_scsi_multi_queues', obj.virtio_scsi_multi_queues)
10638        if obj.virtio_scsi_multi_queues_enabled is not None:
10639            Writer.write_boolean(writer, 'virtio_scsi_multi_queues_enabled', obj.virtio_scsi_multi_queues_enabled)
10640        if obj.cluster is not None:
10641            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
10642        if obj.cpu_profile is not None:
10643            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
10644        if obj.quota is not None:
10645            QuotaWriter.write_one(obj.quota, writer, 'quota')
10646        if obj.storage_domain is not None:
10647            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
10648        writer.write_end()
10649
10650    @staticmethod
10651    def write_many(objs, writer, singular=None, plural=None):
10652        if singular is None:
10653            singular = 'vm_base'
10654        if plural is None:
10655            plural = 'vm_bases'
10656        writer.write_start(plural)
10657        if type(objs) == List:
10658            href = objs.href
10659            if href is not None:
10660                writer.write_attribute('href', href)
10661        for obj in objs:
10662            VmBaseWriter.write_one(obj, writer, singular)
10663        writer.write_end()
10664
10665
10666class VmMediatedDeviceWriter(Writer):
10667
10668    def __init__(self):
10669        super(VmMediatedDeviceWriter, self).__init__()
10670
10671    @staticmethod
10672    def write_one(obj, writer, singular=None):
10673        if singular is None:
10674            singular = 'vm_mediated_device'
10675        writer.write_start(singular)
10676        href = obj.href
10677        if href is not None:
10678            writer.write_attribute('href', href)
10679        if obj.id is not None:
10680            writer.write_attribute('id', obj.id)
10681        if obj.comment is not None:
10682            Writer.write_string(writer, 'comment', obj.comment)
10683        if obj.description is not None:
10684            Writer.write_string(writer, 'description', obj.description)
10685        if obj.name is not None:
10686            Writer.write_string(writer, 'name', obj.name)
10687        if obj.spec_params is not None:
10688            PropertyWriter.write_many(obj.spec_params, writer, 'property', 'spec_params')
10689        if obj.instance_type is not None:
10690            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
10691        if obj.template is not None:
10692            TemplateWriter.write_one(obj.template, writer, 'template')
10693        if obj.vm is not None:
10694            VmWriter.write_one(obj.vm, writer, 'vm')
10695        if obj.vms is not None:
10696            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
10697        writer.write_end()
10698
10699    @staticmethod
10700    def write_many(objs, writer, singular=None, plural=None):
10701        if singular is None:
10702            singular = 'vm_mediated_device'
10703        if plural is None:
10704            plural = 'vm_mediated_devices'
10705        writer.write_start(plural)
10706        if type(objs) == List:
10707            href = objs.href
10708            if href is not None:
10709                writer.write_attribute('href', href)
10710        for obj in objs:
10711            VmMediatedDeviceWriter.write_one(obj, writer, singular)
10712        writer.write_end()
10713
10714
10715class VmPlacementPolicyWriter(Writer):
10716
10717    def __init__(self):
10718        super(VmPlacementPolicyWriter, self).__init__()
10719
10720    @staticmethod
10721    def write_one(obj, writer, singular=None):
10722        if singular is None:
10723            singular = 'vm_placement_policy'
10724        writer.write_start(singular)
10725        href = obj.href
10726        if href is not None:
10727            writer.write_attribute('href', href)
10728        if obj.affinity is not None:
10729            Writer.write_string(writer, 'affinity', obj.affinity.value)
10730        if obj.hosts is not None:
10731            HostWriter.write_many(obj.hosts, writer, 'host', 'hosts')
10732        writer.write_end()
10733
10734    @staticmethod
10735    def write_many(objs, writer, singular=None, plural=None):
10736        if singular is None:
10737            singular = 'vm_placement_policy'
10738        if plural is None:
10739            plural = 'vm_placement_policies'
10740        writer.write_start(plural)
10741        if type(objs) == List:
10742            href = objs.href
10743            if href is not None:
10744                writer.write_attribute('href', href)
10745        for obj in objs:
10746            VmPlacementPolicyWriter.write_one(obj, writer, singular)
10747        writer.write_end()
10748
10749
10750class VmPoolWriter(Writer):
10751
10752    def __init__(self):
10753        super(VmPoolWriter, self).__init__()
10754
10755    @staticmethod
10756    def write_one(obj, writer, singular=None):
10757        if singular is None:
10758            singular = 'vm_pool'
10759        writer.write_start(singular)
10760        href = obj.href
10761        if href is not None:
10762            writer.write_attribute('href', href)
10763        if obj.id is not None:
10764            writer.write_attribute('id', obj.id)
10765        if obj.auto_storage_select is not None:
10766            Writer.write_boolean(writer, 'auto_storage_select', obj.auto_storage_select)
10767        if obj.comment is not None:
10768            Writer.write_string(writer, 'comment', obj.comment)
10769        if obj.description is not None:
10770            Writer.write_string(writer, 'description', obj.description)
10771        if obj.display is not None:
10772            DisplayWriter.write_one(obj.display, writer, 'display')
10773        if obj.max_user_vms is not None:
10774            Writer.write_integer(writer, 'max_user_vms', obj.max_user_vms)
10775        if obj.name is not None:
10776            Writer.write_string(writer, 'name', obj.name)
10777        if obj.prestarted_vms is not None:
10778            Writer.write_integer(writer, 'prestarted_vms', obj.prestarted_vms)
10779        if obj.rng_device is not None:
10780            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
10781        if obj.size is not None:
10782            Writer.write_integer(writer, 'size', obj.size)
10783        if obj.soundcard_enabled is not None:
10784            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
10785        if obj.stateful is not None:
10786            Writer.write_boolean(writer, 'stateful', obj.stateful)
10787        if obj.tpm_enabled is not None:
10788            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
10789        if obj.type is not None:
10790            Writer.write_string(writer, 'type', obj.type.value)
10791        if obj.use_latest_template_version is not None:
10792            Writer.write_boolean(writer, 'use_latest_template_version', obj.use_latest_template_version)
10793        if obj.cluster is not None:
10794            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
10795        if obj.instance_type is not None:
10796            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
10797        if obj.permissions is not None:
10798            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
10799        if obj.template is not None:
10800            TemplateWriter.write_one(obj.template, writer, 'template')
10801        if obj.vm is not None:
10802            VmWriter.write_one(obj.vm, writer, 'vm')
10803        writer.write_end()
10804
10805    @staticmethod
10806    def write_many(objs, writer, singular=None, plural=None):
10807        if singular is None:
10808            singular = 'vm_pool'
10809        if plural is None:
10810            plural = 'vm_pools'
10811        writer.write_start(plural)
10812        if type(objs) == List:
10813            href = objs.href
10814            if href is not None:
10815                writer.write_attribute('href', href)
10816        for obj in objs:
10817            VmPoolWriter.write_one(obj, writer, singular)
10818        writer.write_end()
10819
10820
10821class VmSummaryWriter(Writer):
10822
10823    def __init__(self):
10824        super(VmSummaryWriter, self).__init__()
10825
10826    @staticmethod
10827    def write_one(obj, writer, singular=None):
10828        if singular is None:
10829            singular = 'vm_summary'
10830        writer.write_start(singular)
10831        href = obj.href
10832        if href is not None:
10833            writer.write_attribute('href', href)
10834        if obj.active is not None:
10835            Writer.write_integer(writer, 'active', obj.active)
10836        if obj.migrating is not None:
10837            Writer.write_integer(writer, 'migrating', obj.migrating)
10838        if obj.total is not None:
10839            Writer.write_integer(writer, 'total', obj.total)
10840        writer.write_end()
10841
10842    @staticmethod
10843    def write_many(objs, writer, singular=None, plural=None):
10844        if singular is None:
10845            singular = 'vm_summary'
10846        if plural is None:
10847            plural = 'vm_summaries'
10848        writer.write_start(plural)
10849        if type(objs) == List:
10850            href = objs.href
10851            if href is not None:
10852                writer.write_attribute('href', href)
10853        for obj in objs:
10854            VmSummaryWriter.write_one(obj, writer, singular)
10855        writer.write_end()
10856
10857
10858class VnicPassThroughWriter(Writer):
10859
10860    def __init__(self):
10861        super(VnicPassThroughWriter, self).__init__()
10862
10863    @staticmethod
10864    def write_one(obj, writer, singular=None):
10865        if singular is None:
10866            singular = 'vnic_pass_through'
10867        writer.write_start(singular)
10868        href = obj.href
10869        if href is not None:
10870            writer.write_attribute('href', href)
10871        if obj.mode is not None:
10872            Writer.write_string(writer, 'mode', obj.mode.value)
10873        writer.write_end()
10874
10875    @staticmethod
10876    def write_many(objs, writer, singular=None, plural=None):
10877        if singular is None:
10878            singular = 'vnic_pass_through'
10879        if plural is None:
10880            plural = 'vnic_pass_throughs'
10881        writer.write_start(plural)
10882        if type(objs) == List:
10883            href = objs.href
10884            if href is not None:
10885                writer.write_attribute('href', href)
10886        for obj in objs:
10887            VnicPassThroughWriter.write_one(obj, writer, singular)
10888        writer.write_end()
10889
10890
10891class VnicProfileWriter(Writer):
10892
10893    def __init__(self):
10894        super(VnicProfileWriter, self).__init__()
10895
10896    @staticmethod
10897    def write_one(obj, writer, singular=None):
10898        if singular is None:
10899            singular = 'vnic_profile'
10900        writer.write_start(singular)
10901        href = obj.href
10902        if href is not None:
10903            writer.write_attribute('href', href)
10904        if obj.id is not None:
10905            writer.write_attribute('id', obj.id)
10906        if obj.comment is not None:
10907            Writer.write_string(writer, 'comment', obj.comment)
10908        if obj.custom_properties is not None:
10909            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
10910        if obj.description is not None:
10911            Writer.write_string(writer, 'description', obj.description)
10912        if obj.migratable is not None:
10913            Writer.write_boolean(writer, 'migratable', obj.migratable)
10914        if obj.name is not None:
10915            Writer.write_string(writer, 'name', obj.name)
10916        if obj.pass_through is not None:
10917            VnicPassThroughWriter.write_one(obj.pass_through, writer, 'pass_through')
10918        if obj.port_mirroring is not None:
10919            Writer.write_boolean(writer, 'port_mirroring', obj.port_mirroring)
10920        if obj.failover is not None:
10921            VnicProfileWriter.write_one(obj.failover, writer, 'failover')
10922        if obj.network is not None:
10923            NetworkWriter.write_one(obj.network, writer, 'network')
10924        if obj.network_filter is not None:
10925            NetworkFilterWriter.write_one(obj.network_filter, writer, 'network_filter')
10926        if obj.permissions is not None:
10927            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
10928        if obj.qos is not None:
10929            QosWriter.write_one(obj.qos, writer, 'qos')
10930        writer.write_end()
10931
10932    @staticmethod
10933    def write_many(objs, writer, singular=None, plural=None):
10934        if singular is None:
10935            singular = 'vnic_profile'
10936        if plural is None:
10937            plural = 'vnic_profiles'
10938        writer.write_start(plural)
10939        if type(objs) == List:
10940            href = objs.href
10941            if href is not None:
10942                writer.write_attribute('href', href)
10943        for obj in objs:
10944            VnicProfileWriter.write_one(obj, writer, singular)
10945        writer.write_end()
10946
10947
10948class VnicProfileMappingWriter(Writer):
10949
10950    def __init__(self):
10951        super(VnicProfileMappingWriter, self).__init__()
10952
10953    @staticmethod
10954    def write_one(obj, writer, singular=None):
10955        if singular is None:
10956            singular = 'vnic_profile_mapping'
10957        writer.write_start(singular)
10958        href = obj.href
10959        if href is not None:
10960            writer.write_attribute('href', href)
10961        if obj.source_network_name is not None:
10962            Writer.write_string(writer, 'source_network_name', obj.source_network_name)
10963        if obj.source_network_profile_name is not None:
10964            Writer.write_string(writer, 'source_network_profile_name', obj.source_network_profile_name)
10965        if obj.target_vnic_profile is not None:
10966            VnicProfileWriter.write_one(obj.target_vnic_profile, writer, 'target_vnic_profile')
10967        writer.write_end()
10968
10969    @staticmethod
10970    def write_many(objs, writer, singular=None, plural=None):
10971        if singular is None:
10972            singular = 'vnic_profile_mapping'
10973        if plural is None:
10974            plural = 'vnic_profile_mappings'
10975        writer.write_start(plural)
10976        if type(objs) == List:
10977            href = objs.href
10978            if href is not None:
10979                writer.write_attribute('href', href)
10980        for obj in objs:
10981            VnicProfileMappingWriter.write_one(obj, writer, singular)
10982        writer.write_end()
10983
10984
10985class VolumeGroupWriter(Writer):
10986
10987    def __init__(self):
10988        super(VolumeGroupWriter, self).__init__()
10989
10990    @staticmethod
10991    def write_one(obj, writer, singular=None):
10992        if singular is None:
10993            singular = 'volume_group'
10994        writer.write_start(singular)
10995        href = obj.href
10996        if href is not None:
10997            writer.write_attribute('href', href)
10998        if obj.id is not None:
10999            writer.write_attribute('id', obj.id)
11000        if obj.logical_units is not None:
11001            LogicalUnitWriter.write_many(obj.logical_units, writer, 'logical_unit', 'logical_units')
11002        if obj.name is not None:
11003            Writer.write_string(writer, 'name', obj.name)
11004        writer.write_end()
11005
11006    @staticmethod
11007    def write_many(objs, writer, singular=None, plural=None):
11008        if singular is None:
11009            singular = 'volume_group'
11010        if plural is None:
11011            plural = 'volume_groups'
11012        writer.write_start(plural)
11013        if type(objs) == List:
11014            href = objs.href
11015            if href is not None:
11016                writer.write_attribute('href', href)
11017        for obj in objs:
11018            VolumeGroupWriter.write_one(obj, writer, singular)
11019        writer.write_end()
11020
11021
11022class WatchdogWriter(Writer):
11023
11024    def __init__(self):
11025        super(WatchdogWriter, self).__init__()
11026
11027    @staticmethod
11028    def write_one(obj, writer, singular=None):
11029        if singular is None:
11030            singular = 'watchdog'
11031        writer.write_start(singular)
11032        href = obj.href
11033        if href is not None:
11034            writer.write_attribute('href', href)
11035        if obj.id is not None:
11036            writer.write_attribute('id', obj.id)
11037        if obj.action is not None:
11038            Writer.write_string(writer, 'action', obj.action.value)
11039        if obj.comment is not None:
11040            Writer.write_string(writer, 'comment', obj.comment)
11041        if obj.description is not None:
11042            Writer.write_string(writer, 'description', obj.description)
11043        if obj.model is not None:
11044            Writer.write_string(writer, 'model', obj.model.value)
11045        if obj.name is not None:
11046            Writer.write_string(writer, 'name', obj.name)
11047        if obj.instance_type is not None:
11048            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
11049        if obj.template is not None:
11050            TemplateWriter.write_one(obj.template, writer, 'template')
11051        if obj.vm is not None:
11052            VmWriter.write_one(obj.vm, writer, 'vm')
11053        if obj.vms is not None:
11054            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
11055        writer.write_end()
11056
11057    @staticmethod
11058    def write_many(objs, writer, singular=None, plural=None):
11059        if singular is None:
11060            singular = 'watchdog'
11061        if plural is None:
11062            plural = 'watchdogs'
11063        writer.write_start(plural)
11064        if type(objs) == List:
11065            href = objs.href
11066            if href is not None:
11067                writer.write_attribute('href', href)
11068        for obj in objs:
11069            WatchdogWriter.write_one(obj, writer, singular)
11070        writer.write_end()
11071
11072
11073class WeightWriter(Writer):
11074
11075    def __init__(self):
11076        super(WeightWriter, self).__init__()
11077
11078    @staticmethod
11079    def write_one(obj, writer, singular=None):
11080        if singular is None:
11081            singular = 'weight'
11082        writer.write_start(singular)
11083        href = obj.href
11084        if href is not None:
11085            writer.write_attribute('href', href)
11086        if obj.id is not None:
11087            writer.write_attribute('id', obj.id)
11088        if obj.comment is not None:
11089            Writer.write_string(writer, 'comment', obj.comment)
11090        if obj.description is not None:
11091            Writer.write_string(writer, 'description', obj.description)
11092        if obj.factor is not None:
11093            Writer.write_integer(writer, 'factor', obj.factor)
11094        if obj.name is not None:
11095            Writer.write_string(writer, 'name', obj.name)
11096        if obj.scheduling_policy is not None:
11097            SchedulingPolicyWriter.write_one(obj.scheduling_policy, writer, 'scheduling_policy')
11098        if obj.scheduling_policy_unit is not None:
11099            SchedulingPolicyUnitWriter.write_one(obj.scheduling_policy_unit, writer, 'scheduling_policy_unit')
11100        writer.write_end()
11101
11102    @staticmethod
11103    def write_many(objs, writer, singular=None, plural=None):
11104        if singular is None:
11105            singular = 'weight'
11106        if plural is None:
11107            plural = 'weights'
11108        writer.write_start(plural)
11109        if type(objs) == List:
11110            href = objs.href
11111            if href is not None:
11112                writer.write_attribute('href', href)
11113        for obj in objs:
11114            WeightWriter.write_one(obj, writer, singular)
11115        writer.write_end()
11116
11117
11118Writer.register(types.Action, ActionWriter.write_one)
11119Writer.register(types.AffinityGroup, AffinityGroupWriter.write_one)
11120Writer.register(types.AffinityLabel, AffinityLabelWriter.write_one)
11121Writer.register(types.AffinityRule, AffinityRuleWriter.write_one)
11122Writer.register(types.Agent, AgentWriter.write_one)
11123Writer.register(types.AgentConfiguration, AgentConfigurationWriter.write_one)
11124Writer.register(types.Api, ApiWriter.write_one)
11125Writer.register(types.ApiSummary, ApiSummaryWriter.write_one)
11126Writer.register(types.ApiSummaryItem, ApiSummaryItemWriter.write_one)
11127Writer.register(types.Application, ApplicationWriter.write_one)
11128Writer.register(types.AuthorizedKey, AuthorizedKeyWriter.write_one)
11129Writer.register(types.Backup, BackupWriter.write_one)
11130Writer.register(types.Balance, BalanceWriter.write_one)
11131Writer.register(types.Bios, BiosWriter.write_one)
11132Writer.register(types.BlockStatistic, BlockStatisticWriter.write_one)
11133Writer.register(types.Bonding, BondingWriter.write_one)
11134Writer.register(types.Bookmark, BookmarkWriter.write_one)
11135Writer.register(types.Boot, BootWriter.write_one)
11136Writer.register(types.BootMenu, BootMenuWriter.write_one)
11137Writer.register(types.BrickProfileDetail, BrickProfileDetailWriter.write_one)
11138Writer.register(types.Cdrom, CdromWriter.write_one)
11139Writer.register(types.Certificate, CertificateWriter.write_one)
11140Writer.register(types.Checkpoint, CheckpointWriter.write_one)
11141Writer.register(types.CloudInit, CloudInitWriter.write_one)
11142Writer.register(types.Cluster, ClusterWriter.write_one)
11143Writer.register(types.ClusterFeature, ClusterFeatureWriter.write_one)
11144Writer.register(types.ClusterLevel, ClusterLevelWriter.write_one)
11145Writer.register(types.Configuration, ConfigurationWriter.write_one)
11146Writer.register(types.Console, ConsoleWriter.write_one)
11147Writer.register(types.Core, CoreWriter.write_one)
11148Writer.register(types.Cpu, CpuWriter.write_one)
11149Writer.register(types.CpuProfile, CpuProfileWriter.write_one)
11150Writer.register(types.CpuTopology, CpuTopologyWriter.write_one)
11151Writer.register(types.CpuTune, CpuTuneWriter.write_one)
11152Writer.register(types.CpuType, CpuTypeWriter.write_one)
11153Writer.register(types.CustomProperty, CustomPropertyWriter.write_one)
11154Writer.register(types.DataCenter, DataCenterWriter.write_one)
11155Writer.register(types.Device, DeviceWriter.write_one)
11156Writer.register(types.Disk, DiskWriter.write_one)
11157Writer.register(types.DiskAttachment, DiskAttachmentWriter.write_one)
11158Writer.register(types.DiskProfile, DiskProfileWriter.write_one)
11159Writer.register(types.DiskSnapshot, DiskSnapshotWriter.write_one)
11160Writer.register(types.Display, DisplayWriter.write_one)
11161Writer.register(types.Dns, DnsWriter.write_one)
11162Writer.register(types.DnsResolverConfiguration, DnsResolverConfigurationWriter.write_one)
11163Writer.register(types.Domain, DomainWriter.write_one)
11164Writer.register(types.DynamicCpu, DynamicCpuWriter.write_one)
11165Writer.register(types.EntityProfileDetail, EntityProfileDetailWriter.write_one)
11166Writer.register(types.ErrorHandling, ErrorHandlingWriter.write_one)
11167Writer.register(types.Event, EventWriter.write_one)
11168Writer.register(types.EventSubscription, EventSubscriptionWriter.write_one)
11169Writer.register(types.ExternalComputeResource, ExternalComputeResourceWriter.write_one)
11170Writer.register(types.ExternalDiscoveredHost, ExternalDiscoveredHostWriter.write_one)
11171Writer.register(types.ExternalHost, ExternalHostWriter.write_one)
11172Writer.register(types.ExternalHostGroup, ExternalHostGroupWriter.write_one)
11173Writer.register(types.ExternalHostProvider, ExternalHostProviderWriter.write_one)
11174Writer.register(types.ExternalNetworkProviderConfiguration, ExternalNetworkProviderConfigurationWriter.write_one)
11175Writer.register(types.ExternalProvider, ExternalProviderWriter.write_one)
11176Writer.register(types.ExternalTemplateImport, ExternalTemplateImportWriter.write_one)
11177Writer.register(types.ExternalVmImport, ExternalVmImportWriter.write_one)
11178Writer.register(types.Fault, FaultWriter.write_one)
11179Writer.register(types.FencingPolicy, FencingPolicyWriter.write_one)
11180Writer.register(types.File, FileWriter.write_one)
11181Writer.register(types.Filter, FilterWriter.write_one)
11182Writer.register(types.Floppy, FloppyWriter.write_one)
11183Writer.register(types.FopStatistic, FopStatisticWriter.write_one)
11184Writer.register(types.GlusterBrick, GlusterBrickWriter.write_one)
11185Writer.register(types.GlusterBrickAdvancedDetails, GlusterBrickAdvancedDetailsWriter.write_one)
11186Writer.register(types.GlusterBrickMemoryInfo, GlusterBrickMemoryInfoWriter.write_one)
11187Writer.register(types.GlusterClient, GlusterClientWriter.write_one)
11188Writer.register(types.GlusterHook, GlusterHookWriter.write_one)
11189Writer.register(types.GlusterMemoryPool, GlusterMemoryPoolWriter.write_one)
11190Writer.register(types.GlusterServerHook, GlusterServerHookWriter.write_one)
11191Writer.register(types.GlusterVolume, GlusterVolumeWriter.write_one)
11192Writer.register(types.GlusterVolumeProfileDetails, GlusterVolumeProfileDetailsWriter.write_one)
11193Writer.register(types.GracePeriod, GracePeriodWriter.write_one)
11194Writer.register(types.GraphicsConsole, GraphicsConsoleWriter.write_one)
11195Writer.register(types.Group, GroupWriter.write_one)
11196Writer.register(types.GuestOperatingSystem, GuestOperatingSystemWriter.write_one)
11197Writer.register(types.HardwareInformation, HardwareInformationWriter.write_one)
11198Writer.register(types.HighAvailability, HighAvailabilityWriter.write_one)
11199Writer.register(types.Hook, HookWriter.write_one)
11200Writer.register(types.Host, HostWriter.write_one)
11201Writer.register(types.HostCpuUnit, HostCpuUnitWriter.write_one)
11202Writer.register(types.HostDevice, HostDeviceWriter.write_one)
11203Writer.register(types.HostDevicePassthrough, HostDevicePassthroughWriter.write_one)
11204Writer.register(types.HostNic, HostNicWriter.write_one)
11205Writer.register(types.HostNicVirtualFunctionsConfiguration, HostNicVirtualFunctionsConfigurationWriter.write_one)
11206Writer.register(types.HostStorage, HostStorageWriter.write_one)
11207Writer.register(types.HostedEngine, HostedEngineWriter.write_one)
11208Writer.register(types.Icon, IconWriter.write_one)
11209Writer.register(types.Identified, IdentifiedWriter.write_one)
11210Writer.register(types.Image, ImageWriter.write_one)
11211Writer.register(types.ImageTransfer, ImageTransferWriter.write_one)
11212Writer.register(types.Initialization, InitializationWriter.write_one)
11213Writer.register(types.InstanceType, InstanceTypeWriter.write_one)
11214Writer.register(types.Io, IoWriter.write_one)
11215Writer.register(types.Ip, IpWriter.write_one)
11216Writer.register(types.IpAddressAssignment, IpAddressAssignmentWriter.write_one)
11217Writer.register(types.IscsiBond, IscsiBondWriter.write_one)
11218Writer.register(types.IscsiDetails, IscsiDetailsWriter.write_one)
11219Writer.register(types.Job, JobWriter.write_one)
11220Writer.register(types.KatelloErratum, KatelloErratumWriter.write_one)
11221Writer.register(types.Kernel, KernelWriter.write_one)
11222Writer.register(types.Ksm, KsmWriter.write_one)
11223Writer.register(types.LinkLayerDiscoveryProtocolElement, LinkLayerDiscoveryProtocolElementWriter.write_one)
11224Writer.register(types.LogicalUnit, LogicalUnitWriter.write_one)
11225Writer.register(types.MDevType, MDevTypeWriter.write_one)
11226Writer.register(types.Mac, MacWriter.write_one)
11227Writer.register(types.MacPool, MacPoolWriter.write_one)
11228Writer.register(types.MemoryOverCommit, MemoryOverCommitWriter.write_one)
11229Writer.register(types.MemoryPolicy, MemoryPolicyWriter.write_one)
11230Writer.register(types.Method, MethodWriter.write_one)
11231Writer.register(types.MigrationBandwidth, MigrationBandwidthWriter.write_one)
11232Writer.register(types.MigrationOptions, MigrationOptionsWriter.write_one)
11233Writer.register(types.MigrationPolicy, MigrationPolicyWriter.write_one)
11234Writer.register(types.Network, NetworkWriter.write_one)
11235Writer.register(types.NetworkAttachment, NetworkAttachmentWriter.write_one)
11236Writer.register(types.NetworkConfiguration, NetworkConfigurationWriter.write_one)
11237Writer.register(types.NetworkFilter, NetworkFilterWriter.write_one)
11238Writer.register(types.NetworkFilterParameter, NetworkFilterParameterWriter.write_one)
11239Writer.register(types.NetworkLabel, NetworkLabelWriter.write_one)
11240Writer.register(types.NfsProfileDetail, NfsProfileDetailWriter.write_one)
11241Writer.register(types.Nic, NicWriter.write_one)
11242Writer.register(types.NicConfiguration, NicConfigurationWriter.write_one)
11243Writer.register(types.NumaNode, NumaNodeWriter.write_one)
11244Writer.register(types.NumaNodePin, NumaNodePinWriter.write_one)
11245Writer.register(types.OpenStackImage, OpenStackImageWriter.write_one)
11246Writer.register(types.OpenStackImageProvider, OpenStackImageProviderWriter.write_one)
11247Writer.register(types.OpenStackNetwork, OpenStackNetworkWriter.write_one)
11248Writer.register(types.OpenStackNetworkProvider, OpenStackNetworkProviderWriter.write_one)
11249Writer.register(types.OpenStackProvider, OpenStackProviderWriter.write_one)
11250Writer.register(types.OpenStackSubnet, OpenStackSubnetWriter.write_one)
11251Writer.register(types.OpenStackVolumeProvider, OpenStackVolumeProviderWriter.write_one)
11252Writer.register(types.OpenStackVolumeType, OpenStackVolumeTypeWriter.write_one)
11253Writer.register(types.OpenstackVolumeAuthenticationKey, OpenstackVolumeAuthenticationKeyWriter.write_one)
11254Writer.register(types.OperatingSystem, OperatingSystemWriter.write_one)
11255Writer.register(types.OperatingSystemInfo, OperatingSystemInfoWriter.write_one)
11256Writer.register(types.Option, OptionWriter.write_one)
11257Writer.register(types.Package, PackageWriter.write_one)
11258Writer.register(types.Payload, PayloadWriter.write_one)
11259Writer.register(types.Permission, PermissionWriter.write_one)
11260Writer.register(types.Permit, PermitWriter.write_one)
11261Writer.register(types.PmProxy, PmProxyWriter.write_one)
11262Writer.register(types.PortMirroring, PortMirroringWriter.write_one)
11263Writer.register(types.PowerManagement, PowerManagementWriter.write_one)
11264Writer.register(types.Product, ProductWriter.write_one)
11265Writer.register(types.ProductInfo, ProductInfoWriter.write_one)
11266Writer.register(types.ProfileDetail, ProfileDetailWriter.write_one)
11267Writer.register(types.Property, PropertyWriter.write_one)
11268Writer.register(types.ProxyTicket, ProxyTicketWriter.write_one)
11269Writer.register(types.Qos, QosWriter.write_one)
11270Writer.register(types.Quota, QuotaWriter.write_one)
11271Writer.register(types.QuotaClusterLimit, QuotaClusterLimitWriter.write_one)
11272Writer.register(types.QuotaStorageLimit, QuotaStorageLimitWriter.write_one)
11273Writer.register(types.Range, RangeWriter.write_one)
11274Writer.register(types.Rate, RateWriter.write_one)
11275Writer.register(types.RegistrationAffinityGroupMapping, RegistrationAffinityGroupMappingWriter.write_one)
11276Writer.register(types.RegistrationAffinityLabelMapping, RegistrationAffinityLabelMappingWriter.write_one)
11277Writer.register(types.RegistrationClusterMapping, RegistrationClusterMappingWriter.write_one)
11278Writer.register(types.RegistrationConfiguration, RegistrationConfigurationWriter.write_one)
11279Writer.register(types.RegistrationDomainMapping, RegistrationDomainMappingWriter.write_one)
11280Writer.register(types.RegistrationLunMapping, RegistrationLunMappingWriter.write_one)
11281Writer.register(types.RegistrationRoleMapping, RegistrationRoleMappingWriter.write_one)
11282Writer.register(types.RegistrationVnicProfileMapping, RegistrationVnicProfileMappingWriter.write_one)
11283Writer.register(types.ReportedConfiguration, ReportedConfigurationWriter.write_one)
11284Writer.register(types.ReportedDevice, ReportedDeviceWriter.write_one)
11285Writer.register(types.RngDevice, RngDeviceWriter.write_one)
11286Writer.register(types.Role, RoleWriter.write_one)
11287Writer.register(types.SchedulingPolicy, SchedulingPolicyWriter.write_one)
11288Writer.register(types.SchedulingPolicyUnit, SchedulingPolicyUnitWriter.write_one)
11289Writer.register(types.SeLinux, SeLinuxWriter.write_one)
11290Writer.register(types.SerialNumber, SerialNumberWriter.write_one)
11291Writer.register(types.Session, SessionWriter.write_one)
11292Writer.register(types.SkipIfConnectivityBroken, SkipIfConnectivityBrokenWriter.write_one)
11293Writer.register(types.SkipIfSdActive, SkipIfSdActiveWriter.write_one)
11294Writer.register(types.Snapshot, SnapshotWriter.write_one)
11295Writer.register(types.SpecialObjects, SpecialObjectsWriter.write_one)
11296Writer.register(types.Spm, SpmWriter.write_one)
11297Writer.register(types.Ssh, SshWriter.write_one)
11298Writer.register(types.SshPublicKey, SshPublicKeyWriter.write_one)
11299Writer.register(types.Sso, SsoWriter.write_one)
11300Writer.register(types.Statistic, StatisticWriter.write_one)
11301Writer.register(types.Step, StepWriter.write_one)
11302Writer.register(types.StorageConnection, StorageConnectionWriter.write_one)
11303Writer.register(types.StorageConnectionExtension, StorageConnectionExtensionWriter.write_one)
11304Writer.register(types.StorageDomain, StorageDomainWriter.write_one)
11305Writer.register(types.StorageDomainLease, StorageDomainLeaseWriter.write_one)
11306Writer.register(types.SystemOption, SystemOptionWriter.write_one)
11307Writer.register(types.SystemOptionValue, SystemOptionValueWriter.write_one)
11308Writer.register(types.Tag, TagWriter.write_one)
11309Writer.register(types.Template, TemplateWriter.write_one)
11310Writer.register(types.TemplateVersion, TemplateVersionWriter.write_one)
11311Writer.register(types.Ticket, TicketWriter.write_one)
11312Writer.register(types.TimeZone, TimeZoneWriter.write_one)
11313Writer.register(types.TransparentHugePages, TransparentHugePagesWriter.write_one)
11314Writer.register(types.UnmanagedNetwork, UnmanagedNetworkWriter.write_one)
11315Writer.register(types.Usb, UsbWriter.write_one)
11316Writer.register(types.User, UserWriter.write_one)
11317Writer.register(types.UserOption, UserOptionWriter.write_one)
11318Writer.register(types.Value, ValueWriter.write_one)
11319Writer.register(types.VcpuPin, VcpuPinWriter.write_one)
11320Writer.register(types.Vendor, VendorWriter.write_one)
11321Writer.register(types.Version, VersionWriter.write_one)
11322Writer.register(types.VirtioScsi, VirtioScsiWriter.write_one)
11323Writer.register(types.VirtualNumaNode, VirtualNumaNodeWriter.write_one)
11324Writer.register(types.Vlan, VlanWriter.write_one)
11325Writer.register(types.Vm, VmWriter.write_one)
11326Writer.register(types.VmBase, VmBaseWriter.write_one)
11327Writer.register(types.VmMediatedDevice, VmMediatedDeviceWriter.write_one)
11328Writer.register(types.VmPlacementPolicy, VmPlacementPolicyWriter.write_one)
11329Writer.register(types.VmPool, VmPoolWriter.write_one)
11330Writer.register(types.VmSummary, VmSummaryWriter.write_one)
11331Writer.register(types.VnicPassThrough, VnicPassThroughWriter.write_one)
11332Writer.register(types.VnicProfile, VnicProfileWriter.write_one)
11333Writer.register(types.VnicProfileMapping, VnicProfileMappingWriter.write_one)
11334Writer.register(types.VolumeGroup, VolumeGroupWriter.write_one)
11335Writer.register(types.Watchdog, WatchdogWriter.write_one)
11336Writer.register(types.Weight, WeightWriter.write_one)
class ActionWriter(ovirtsdk4.writer.Writer):
 26class ActionWriter(Writer):
 27
 28    def __init__(self):
 29        super(ActionWriter, self).__init__()
 30
 31    @staticmethod
 32    def write_one(obj, writer, singular=None):
 33        if singular is None:
 34            singular = 'action'
 35        writer.write_start(singular)
 36        href = obj.href
 37        if href is not None:
 38            writer.write_attribute('href', href)
 39        if obj.id is not None:
 40            writer.write_attribute('id', obj.id)
 41        if obj.activate is not None:
 42            Writer.write_boolean(writer, 'activate', obj.activate)
 43        if obj.allow_partial_import is not None:
 44            Writer.write_boolean(writer, 'allow_partial_import', obj.allow_partial_import)
 45        if obj.async_ is not None:
 46            Writer.write_boolean(writer, 'async', obj.async_)
 47        if obj.attachment is not None:
 48            DiskAttachmentWriter.write_one(obj.attachment, writer, 'attachment')
 49        if obj.authorized_key is not None:
 50            AuthorizedKeyWriter.write_one(obj.authorized_key, writer, 'authorized_key')
 51        if obj.auto_pinning_policy is not None:
 52            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
 53        if obj.bricks is not None:
 54            GlusterBrickWriter.write_many(obj.bricks, writer, 'brick', 'bricks')
 55        if obj.certificates is not None:
 56            CertificateWriter.write_many(obj.certificates, writer, 'certificate', 'certificates')
 57        if obj.check_connectivity is not None:
 58            Writer.write_boolean(writer, 'check_connectivity', obj.check_connectivity)
 59        if obj.clone is not None:
 60            Writer.write_boolean(writer, 'clone', obj.clone)
 61        if obj.clone_permissions is not None:
 62            Writer.write_boolean(writer, 'clone_permissions', obj.clone_permissions)
 63        if obj.cluster is not None:
 64            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
 65        if obj.collapse_snapshots is not None:
 66            Writer.write_boolean(writer, 'collapse_snapshots', obj.collapse_snapshots)
 67        if obj.comment is not None:
 68            Writer.write_string(writer, 'comment', obj.comment)
 69        if obj.commit_on_success is not None:
 70            Writer.write_boolean(writer, 'commit_on_success', obj.commit_on_success)
 71        if obj.connection is not None:
 72            StorageConnectionWriter.write_one(obj.connection, writer, 'connection')
 73        if obj.connectivity_timeout is not None:
 74            Writer.write_integer(writer, 'connectivity_timeout', obj.connectivity_timeout)
 75        if obj.correlation_id is not None:
 76            Writer.write_string(writer, 'correlation_id', obj.correlation_id)
 77        if obj.data_center is not None:
 78            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
 79        if obj.deploy_hosted_engine is not None:
 80            Writer.write_boolean(writer, 'deploy_hosted_engine', obj.deploy_hosted_engine)
 81        if obj.description is not None:
 82            Writer.write_string(writer, 'description', obj.description)
 83        if obj.details is not None:
 84            GlusterVolumeProfileDetailsWriter.write_one(obj.details, writer, 'details')
 85        if obj.directory is not None:
 86            Writer.write_string(writer, 'directory', obj.directory)
 87        if obj.discard_snapshots is not None:
 88            Writer.write_boolean(writer, 'discard_snapshots', obj.discard_snapshots)
 89        if obj.discovered_targets is not None:
 90            IscsiDetailsWriter.write_many(obj.discovered_targets, writer, 'iscsi_details', 'discovered_targets')
 91        if obj.disk is not None:
 92            DiskWriter.write_one(obj.disk, writer, 'disk')
 93        if obj.disk_profile is not None:
 94            DiskProfileWriter.write_one(obj.disk_profile, writer, 'disk_profile')
 95        if obj.disks is not None:
 96            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
 97        if obj.exclusive is not None:
 98            Writer.write_boolean(writer, 'exclusive', obj.exclusive)
 99        if obj.fault is not None:
100            FaultWriter.write_one(obj.fault, writer, 'fault')
101        if obj.fence_type is not None:
102            Writer.write_string(writer, 'fence_type', obj.fence_type)
103        if obj.filename is not None:
104            Writer.write_string(writer, 'filename', obj.filename)
105        if obj.filter is not None:
106            Writer.write_boolean(writer, 'filter', obj.filter)
107        if obj.fix_layout is not None:
108            Writer.write_boolean(writer, 'fix_layout', obj.fix_layout)
109        if obj.follow is not None:
110            Writer.write_string(writer, 'follow', obj.follow)
111        if obj.force is not None:
112            Writer.write_boolean(writer, 'force', obj.force)
113        if obj.grace_period is not None:
114            GracePeriodWriter.write_one(obj.grace_period, writer, 'grace_period')
115        if obj.host is not None:
116            HostWriter.write_one(obj.host, writer, 'host')
117        if obj.image is not None:
118            Writer.write_string(writer, 'image', obj.image)
119        if obj.image_transfer is not None:
120            ImageTransferWriter.write_one(obj.image_transfer, writer, 'image_transfer')
121        if obj.import_as_template is not None:
122            Writer.write_boolean(writer, 'import_as_template', obj.import_as_template)
123        if obj.is_attached is not None:
124            Writer.write_boolean(writer, 'is_attached', obj.is_attached)
125        if obj.iscsi is not None:
126            IscsiDetailsWriter.write_one(obj.iscsi, writer, 'iscsi')
127        if obj.iscsi_targets is not None:
128            writer.write_start('iscsi_targets')
129            for item in obj.iscsi_targets:
130                if item is not None:
131                    Writer.write_string(writer, 'iscsi_target', item)
132            writer.write_end()
133        if obj.job is not None:
134            JobWriter.write_one(obj.job, writer, 'job')
135        if obj.lease is not None:
136            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
137        if obj.logical_units is not None:
138            LogicalUnitWriter.write_many(obj.logical_units, writer, 'logical_unit', 'logical_units')
139        if obj.maintenance_after_restart is not None:
140            Writer.write_boolean(writer, 'maintenance_after_restart', obj.maintenance_after_restart)
141        if obj.maintenance_enabled is not None:
142            Writer.write_boolean(writer, 'maintenance_enabled', obj.maintenance_enabled)
143        if obj.migrate_vms_in_affinity_closure is not None:
144            Writer.write_boolean(writer, 'migrate_vms_in_affinity_closure', obj.migrate_vms_in_affinity_closure)
145        if obj.modified_bonds is not None:
146            HostNicWriter.write_many(obj.modified_bonds, writer, 'host_nic', 'modified_bonds')
147        if obj.modified_labels is not None:
148            NetworkLabelWriter.write_many(obj.modified_labels, writer, 'network_label', 'modified_labels')
149        if obj.modified_network_attachments is not None:
150            NetworkAttachmentWriter.write_many(obj.modified_network_attachments, writer, 'network_attachment', 'modified_network_attachments')
151        if obj.name is not None:
152            Writer.write_string(writer, 'name', obj.name)
153        if obj.optimize_cpu_settings is not None:
154            Writer.write_boolean(writer, 'optimize_cpu_settings', obj.optimize_cpu_settings)
155        if obj.option is not None:
156            OptionWriter.write_one(obj.option, writer, 'option')
157        if obj.pause is not None:
158            Writer.write_boolean(writer, 'pause', obj.pause)
159        if obj.permission is not None:
160            PermissionWriter.write_one(obj.permission, writer, 'permission')
161        if obj.power_management is not None:
162            PowerManagementWriter.write_one(obj.power_management, writer, 'power_management')
163        if obj.proxy_ticket is not None:
164            ProxyTicketWriter.write_one(obj.proxy_ticket, writer, 'proxy_ticket')
165        if obj.quota is not None:
166            QuotaWriter.write_one(obj.quota, writer, 'quota')
167        if obj.reason is not None:
168            Writer.write_string(writer, 'reason', obj.reason)
169        if obj.reassign_bad_macs is not None:
170            Writer.write_boolean(writer, 'reassign_bad_macs', obj.reassign_bad_macs)
171        if obj.reboot is not None:
172            Writer.write_boolean(writer, 'reboot', obj.reboot)
173        if obj.registration_configuration is not None:
174            RegistrationConfigurationWriter.write_one(obj.registration_configuration, writer, 'registration_configuration')
175        if obj.remote_viewer_connection_file is not None:
176            Writer.write_string(writer, 'remote_viewer_connection_file', obj.remote_viewer_connection_file)
177        if obj.removed_bonds is not None:
178            HostNicWriter.write_many(obj.removed_bonds, writer, 'host_nic', 'removed_bonds')
179        if obj.removed_labels is not None:
180            NetworkLabelWriter.write_many(obj.removed_labels, writer, 'network_label', 'removed_labels')
181        if obj.removed_network_attachments is not None:
182            NetworkAttachmentWriter.write_many(obj.removed_network_attachments, writer, 'network_attachment', 'removed_network_attachments')
183        if obj.resolution_type is not None:
184            Writer.write_string(writer, 'resolution_type', obj.resolution_type)
185        if obj.restore_memory is not None:
186            Writer.write_boolean(writer, 'restore_memory', obj.restore_memory)
187        if obj.root_password is not None:
188            Writer.write_string(writer, 'root_password', obj.root_password)
189        if obj.seal is not None:
190            Writer.write_boolean(writer, 'seal', obj.seal)
191        if obj.snapshot is not None:
192            SnapshotWriter.write_one(obj.snapshot, writer, 'snapshot')
193        if obj.source_host is not None:
194            HostWriter.write_one(obj.source_host, writer, 'source_host')
195        if obj.ssh is not None:
196            SshWriter.write_one(obj.ssh, writer, 'ssh')
197        if obj.status is not None:
198            Writer.write_string(writer, 'status', obj.status)
199        if obj.stop_gluster_service is not None:
200            Writer.write_boolean(writer, 'stop_gluster_service', obj.stop_gluster_service)
201        if obj.storage_domain is not None:
202            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
203        if obj.storage_domains is not None:
204            StorageDomainWriter.write_many(obj.storage_domains, writer, 'storage_domain', 'storage_domains')
205        if obj.succeeded is not None:
206            Writer.write_boolean(writer, 'succeeded', obj.succeeded)
207        if obj.synchronized_network_attachments is not None:
208            NetworkAttachmentWriter.write_many(obj.synchronized_network_attachments, writer, 'network_attachment', 'synchronized_network_attachments')
209        if obj.template is not None:
210            TemplateWriter.write_one(obj.template, writer, 'template')
211        if obj.ticket is not None:
212            TicketWriter.write_one(obj.ticket, writer, 'ticket')
213        if obj.timeout is not None:
214            Writer.write_integer(writer, 'timeout', obj.timeout)
215        if obj.undeploy_hosted_engine is not None:
216            Writer.write_boolean(writer, 'undeploy_hosted_engine', obj.undeploy_hosted_engine)
217        if obj.upgrade_action is not None:
218            Writer.write_string(writer, 'upgrade_action', obj.upgrade_action.value)
219        if obj.upgrade_percent_complete is not None:
220            Writer.write_integer(writer, 'upgrade_percent_complete', obj.upgrade_percent_complete)
221        if obj.use_cloud_init is not None:
222            Writer.write_boolean(writer, 'use_cloud_init', obj.use_cloud_init)
223        if obj.use_ignition is not None:
224            Writer.write_boolean(writer, 'use_ignition', obj.use_ignition)
225        if obj.use_initialization is not None:
226            Writer.write_boolean(writer, 'use_initialization', obj.use_initialization)
227        if obj.use_sysprep is not None:
228            Writer.write_boolean(writer, 'use_sysprep', obj.use_sysprep)
229        if obj.virtual_functions_configuration is not None:
230            HostNicVirtualFunctionsConfigurationWriter.write_one(obj.virtual_functions_configuration, writer, 'virtual_functions_configuration')
231        if obj.vm is not None:
232            VmWriter.write_one(obj.vm, writer, 'vm')
233        if obj.vnic_profile_mappings is not None:
234            VnicProfileMappingWriter.write_many(obj.vnic_profile_mappings, writer, 'vnic_profile_mapping', 'vnic_profile_mappings')
235        if obj.volatile is not None:
236            Writer.write_boolean(writer, 'volatile', obj.volatile)
237        writer.write_end()
238
239    @staticmethod
240    def write_many(objs, writer, singular=None, plural=None):
241        if singular is None:
242            singular = 'action'
243        if plural is None:
244            plural = 'actions'
245        writer.write_start(plural)
246        if type(objs) == List:
247            href = objs.href
248            if href is not None:
249                writer.write_attribute('href', href)
250        for obj in objs:
251            ActionWriter.write_one(obj, writer, singular)
252        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ActionWriter()
28    def __init__(self):
29        super(ActionWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
 31    @staticmethod
 32    def write_one(obj, writer, singular=None):
 33        if singular is None:
 34            singular = 'action'
 35        writer.write_start(singular)
 36        href = obj.href
 37        if href is not None:
 38            writer.write_attribute('href', href)
 39        if obj.id is not None:
 40            writer.write_attribute('id', obj.id)
 41        if obj.activate is not None:
 42            Writer.write_boolean(writer, 'activate', obj.activate)
 43        if obj.allow_partial_import is not None:
 44            Writer.write_boolean(writer, 'allow_partial_import', obj.allow_partial_import)
 45        if obj.async_ is not None:
 46            Writer.write_boolean(writer, 'async', obj.async_)
 47        if obj.attachment is not None:
 48            DiskAttachmentWriter.write_one(obj.attachment, writer, 'attachment')
 49        if obj.authorized_key is not None:
 50            AuthorizedKeyWriter.write_one(obj.authorized_key, writer, 'authorized_key')
 51        if obj.auto_pinning_policy is not None:
 52            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
 53        if obj.bricks is not None:
 54            GlusterBrickWriter.write_many(obj.bricks, writer, 'brick', 'bricks')
 55        if obj.certificates is not None:
 56            CertificateWriter.write_many(obj.certificates, writer, 'certificate', 'certificates')
 57        if obj.check_connectivity is not None:
 58            Writer.write_boolean(writer, 'check_connectivity', obj.check_connectivity)
 59        if obj.clone is not None:
 60            Writer.write_boolean(writer, 'clone', obj.clone)
 61        if obj.clone_permissions is not None:
 62            Writer.write_boolean(writer, 'clone_permissions', obj.clone_permissions)
 63        if obj.cluster is not None:
 64            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
 65        if obj.collapse_snapshots is not None:
 66            Writer.write_boolean(writer, 'collapse_snapshots', obj.collapse_snapshots)
 67        if obj.comment is not None:
 68            Writer.write_string(writer, 'comment', obj.comment)
 69        if obj.commit_on_success is not None:
 70            Writer.write_boolean(writer, 'commit_on_success', obj.commit_on_success)
 71        if obj.connection is not None:
 72            StorageConnectionWriter.write_one(obj.connection, writer, 'connection')
 73        if obj.connectivity_timeout is not None:
 74            Writer.write_integer(writer, 'connectivity_timeout', obj.connectivity_timeout)
 75        if obj.correlation_id is not None:
 76            Writer.write_string(writer, 'correlation_id', obj.correlation_id)
 77        if obj.data_center is not None:
 78            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
 79        if obj.deploy_hosted_engine is not None:
 80            Writer.write_boolean(writer, 'deploy_hosted_engine', obj.deploy_hosted_engine)
 81        if obj.description is not None:
 82            Writer.write_string(writer, 'description', obj.description)
 83        if obj.details is not None:
 84            GlusterVolumeProfileDetailsWriter.write_one(obj.details, writer, 'details')
 85        if obj.directory is not None:
 86            Writer.write_string(writer, 'directory', obj.directory)
 87        if obj.discard_snapshots is not None:
 88            Writer.write_boolean(writer, 'discard_snapshots', obj.discard_snapshots)
 89        if obj.discovered_targets is not None:
 90            IscsiDetailsWriter.write_many(obj.discovered_targets, writer, 'iscsi_details', 'discovered_targets')
 91        if obj.disk is not None:
 92            DiskWriter.write_one(obj.disk, writer, 'disk')
 93        if obj.disk_profile is not None:
 94            DiskProfileWriter.write_one(obj.disk_profile, writer, 'disk_profile')
 95        if obj.disks is not None:
 96            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
 97        if obj.exclusive is not None:
 98            Writer.write_boolean(writer, 'exclusive', obj.exclusive)
 99        if obj.fault is not None:
100            FaultWriter.write_one(obj.fault, writer, 'fault')
101        if obj.fence_type is not None:
102            Writer.write_string(writer, 'fence_type', obj.fence_type)
103        if obj.filename is not None:
104            Writer.write_string(writer, 'filename', obj.filename)
105        if obj.filter is not None:
106            Writer.write_boolean(writer, 'filter', obj.filter)
107        if obj.fix_layout is not None:
108            Writer.write_boolean(writer, 'fix_layout', obj.fix_layout)
109        if obj.follow is not None:
110            Writer.write_string(writer, 'follow', obj.follow)
111        if obj.force is not None:
112            Writer.write_boolean(writer, 'force', obj.force)
113        if obj.grace_period is not None:
114            GracePeriodWriter.write_one(obj.grace_period, writer, 'grace_period')
115        if obj.host is not None:
116            HostWriter.write_one(obj.host, writer, 'host')
117        if obj.image is not None:
118            Writer.write_string(writer, 'image', obj.image)
119        if obj.image_transfer is not None:
120            ImageTransferWriter.write_one(obj.image_transfer, writer, 'image_transfer')
121        if obj.import_as_template is not None:
122            Writer.write_boolean(writer, 'import_as_template', obj.import_as_template)
123        if obj.is_attached is not None:
124            Writer.write_boolean(writer, 'is_attached', obj.is_attached)
125        if obj.iscsi is not None:
126            IscsiDetailsWriter.write_one(obj.iscsi, writer, 'iscsi')
127        if obj.iscsi_targets is not None:
128            writer.write_start('iscsi_targets')
129            for item in obj.iscsi_targets:
130                if item is not None:
131                    Writer.write_string(writer, 'iscsi_target', item)
132            writer.write_end()
133        if obj.job is not None:
134            JobWriter.write_one(obj.job, writer, 'job')
135        if obj.lease is not None:
136            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
137        if obj.logical_units is not None:
138            LogicalUnitWriter.write_many(obj.logical_units, writer, 'logical_unit', 'logical_units')
139        if obj.maintenance_after_restart is not None:
140            Writer.write_boolean(writer, 'maintenance_after_restart', obj.maintenance_after_restart)
141        if obj.maintenance_enabled is not None:
142            Writer.write_boolean(writer, 'maintenance_enabled', obj.maintenance_enabled)
143        if obj.migrate_vms_in_affinity_closure is not None:
144            Writer.write_boolean(writer, 'migrate_vms_in_affinity_closure', obj.migrate_vms_in_affinity_closure)
145        if obj.modified_bonds is not None:
146            HostNicWriter.write_many(obj.modified_bonds, writer, 'host_nic', 'modified_bonds')
147        if obj.modified_labels is not None:
148            NetworkLabelWriter.write_many(obj.modified_labels, writer, 'network_label', 'modified_labels')
149        if obj.modified_network_attachments is not None:
150            NetworkAttachmentWriter.write_many(obj.modified_network_attachments, writer, 'network_attachment', 'modified_network_attachments')
151        if obj.name is not None:
152            Writer.write_string(writer, 'name', obj.name)
153        if obj.optimize_cpu_settings is not None:
154            Writer.write_boolean(writer, 'optimize_cpu_settings', obj.optimize_cpu_settings)
155        if obj.option is not None:
156            OptionWriter.write_one(obj.option, writer, 'option')
157        if obj.pause is not None:
158            Writer.write_boolean(writer, 'pause', obj.pause)
159        if obj.permission is not None:
160            PermissionWriter.write_one(obj.permission, writer, 'permission')
161        if obj.power_management is not None:
162            PowerManagementWriter.write_one(obj.power_management, writer, 'power_management')
163        if obj.proxy_ticket is not None:
164            ProxyTicketWriter.write_one(obj.proxy_ticket, writer, 'proxy_ticket')
165        if obj.quota is not None:
166            QuotaWriter.write_one(obj.quota, writer, 'quota')
167        if obj.reason is not None:
168            Writer.write_string(writer, 'reason', obj.reason)
169        if obj.reassign_bad_macs is not None:
170            Writer.write_boolean(writer, 'reassign_bad_macs', obj.reassign_bad_macs)
171        if obj.reboot is not None:
172            Writer.write_boolean(writer, 'reboot', obj.reboot)
173        if obj.registration_configuration is not None:
174            RegistrationConfigurationWriter.write_one(obj.registration_configuration, writer, 'registration_configuration')
175        if obj.remote_viewer_connection_file is not None:
176            Writer.write_string(writer, 'remote_viewer_connection_file', obj.remote_viewer_connection_file)
177        if obj.removed_bonds is not None:
178            HostNicWriter.write_many(obj.removed_bonds, writer, 'host_nic', 'removed_bonds')
179        if obj.removed_labels is not None:
180            NetworkLabelWriter.write_many(obj.removed_labels, writer, 'network_label', 'removed_labels')
181        if obj.removed_network_attachments is not None:
182            NetworkAttachmentWriter.write_many(obj.removed_network_attachments, writer, 'network_attachment', 'removed_network_attachments')
183        if obj.resolution_type is not None:
184            Writer.write_string(writer, 'resolution_type', obj.resolution_type)
185        if obj.restore_memory is not None:
186            Writer.write_boolean(writer, 'restore_memory', obj.restore_memory)
187        if obj.root_password is not None:
188            Writer.write_string(writer, 'root_password', obj.root_password)
189        if obj.seal is not None:
190            Writer.write_boolean(writer, 'seal', obj.seal)
191        if obj.snapshot is not None:
192            SnapshotWriter.write_one(obj.snapshot, writer, 'snapshot')
193        if obj.source_host is not None:
194            HostWriter.write_one(obj.source_host, writer, 'source_host')
195        if obj.ssh is not None:
196            SshWriter.write_one(obj.ssh, writer, 'ssh')
197        if obj.status is not None:
198            Writer.write_string(writer, 'status', obj.status)
199        if obj.stop_gluster_service is not None:
200            Writer.write_boolean(writer, 'stop_gluster_service', obj.stop_gluster_service)
201        if obj.storage_domain is not None:
202            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
203        if obj.storage_domains is not None:
204            StorageDomainWriter.write_many(obj.storage_domains, writer, 'storage_domain', 'storage_domains')
205        if obj.succeeded is not None:
206            Writer.write_boolean(writer, 'succeeded', obj.succeeded)
207        if obj.synchronized_network_attachments is not None:
208            NetworkAttachmentWriter.write_many(obj.synchronized_network_attachments, writer, 'network_attachment', 'synchronized_network_attachments')
209        if obj.template is not None:
210            TemplateWriter.write_one(obj.template, writer, 'template')
211        if obj.ticket is not None:
212            TicketWriter.write_one(obj.ticket, writer, 'ticket')
213        if obj.timeout is not None:
214            Writer.write_integer(writer, 'timeout', obj.timeout)
215        if obj.undeploy_hosted_engine is not None:
216            Writer.write_boolean(writer, 'undeploy_hosted_engine', obj.undeploy_hosted_engine)
217        if obj.upgrade_action is not None:
218            Writer.write_string(writer, 'upgrade_action', obj.upgrade_action.value)
219        if obj.upgrade_percent_complete is not None:
220            Writer.write_integer(writer, 'upgrade_percent_complete', obj.upgrade_percent_complete)
221        if obj.use_cloud_init is not None:
222            Writer.write_boolean(writer, 'use_cloud_init', obj.use_cloud_init)
223        if obj.use_ignition is not None:
224            Writer.write_boolean(writer, 'use_ignition', obj.use_ignition)
225        if obj.use_initialization is not None:
226            Writer.write_boolean(writer, 'use_initialization', obj.use_initialization)
227        if obj.use_sysprep is not None:
228            Writer.write_boolean(writer, 'use_sysprep', obj.use_sysprep)
229        if obj.virtual_functions_configuration is not None:
230            HostNicVirtualFunctionsConfigurationWriter.write_one(obj.virtual_functions_configuration, writer, 'virtual_functions_configuration')
231        if obj.vm is not None:
232            VmWriter.write_one(obj.vm, writer, 'vm')
233        if obj.vnic_profile_mappings is not None:
234            VnicProfileMappingWriter.write_many(obj.vnic_profile_mappings, writer, 'vnic_profile_mapping', 'vnic_profile_mappings')
235        if obj.volatile is not None:
236            Writer.write_boolean(writer, 'volatile', obj.volatile)
237        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
239    @staticmethod
240    def write_many(objs, writer, singular=None, plural=None):
241        if singular is None:
242            singular = 'action'
243        if plural is None:
244            plural = 'actions'
245        writer.write_start(plural)
246        if type(objs) == List:
247            href = objs.href
248            if href is not None:
249                writer.write_attribute('href', href)
250        for obj in objs:
251            ActionWriter.write_one(obj, writer, singular)
252        writer.write_end()
class AffinityGroupWriter(ovirtsdk4.writer.Writer):
255class AffinityGroupWriter(Writer):
256
257    def __init__(self):
258        super(AffinityGroupWriter, self).__init__()
259
260    @staticmethod
261    def write_one(obj, writer, singular=None):
262        if singular is None:
263            singular = 'affinity_group'
264        writer.write_start(singular)
265        href = obj.href
266        if href is not None:
267            writer.write_attribute('href', href)
268        if obj.id is not None:
269            writer.write_attribute('id', obj.id)
270        if obj.broken is not None:
271            Writer.write_boolean(writer, 'broken', obj.broken)
272        if obj.comment is not None:
273            Writer.write_string(writer, 'comment', obj.comment)
274        if obj.description is not None:
275            Writer.write_string(writer, 'description', obj.description)
276        if obj.enforcing is not None:
277            Writer.write_boolean(writer, 'enforcing', obj.enforcing)
278        if obj.hosts_rule is not None:
279            AffinityRuleWriter.write_one(obj.hosts_rule, writer, 'hosts_rule')
280        if obj.name is not None:
281            Writer.write_string(writer, 'name', obj.name)
282        if obj.positive is not None:
283            Writer.write_boolean(writer, 'positive', obj.positive)
284        if obj.priority is not None:
285            Writer.write_decimal(writer, 'priority', obj.priority)
286        if obj.vms_rule is not None:
287            AffinityRuleWriter.write_one(obj.vms_rule, writer, 'vms_rule')
288        if obj.cluster is not None:
289            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
290        if obj.host_labels is not None:
291            AffinityLabelWriter.write_many(obj.host_labels, writer, 'affinity_label', 'host_labels')
292        if obj.hosts is not None:
293            HostWriter.write_many(obj.hosts, writer, 'host', 'hosts')
294        if obj.vm_labels is not None:
295            AffinityLabelWriter.write_many(obj.vm_labels, writer, 'affinity_label', 'vm_labels')
296        if obj.vms is not None:
297            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
298        writer.write_end()
299
300    @staticmethod
301    def write_many(objs, writer, singular=None, plural=None):
302        if singular is None:
303            singular = 'affinity_group'
304        if plural is None:
305            plural = 'affinity_groups'
306        writer.write_start(plural)
307        if type(objs) == List:
308            href = objs.href
309            if href is not None:
310                writer.write_attribute('href', href)
311        for obj in objs:
312            AffinityGroupWriter.write_one(obj, writer, singular)
313        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

AffinityGroupWriter()
257    def __init__(self):
258        super(AffinityGroupWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
260    @staticmethod
261    def write_one(obj, writer, singular=None):
262        if singular is None:
263            singular = 'affinity_group'
264        writer.write_start(singular)
265        href = obj.href
266        if href is not None:
267            writer.write_attribute('href', href)
268        if obj.id is not None:
269            writer.write_attribute('id', obj.id)
270        if obj.broken is not None:
271            Writer.write_boolean(writer, 'broken', obj.broken)
272        if obj.comment is not None:
273            Writer.write_string(writer, 'comment', obj.comment)
274        if obj.description is not None:
275            Writer.write_string(writer, 'description', obj.description)
276        if obj.enforcing is not None:
277            Writer.write_boolean(writer, 'enforcing', obj.enforcing)
278        if obj.hosts_rule is not None:
279            AffinityRuleWriter.write_one(obj.hosts_rule, writer, 'hosts_rule')
280        if obj.name is not None:
281            Writer.write_string(writer, 'name', obj.name)
282        if obj.positive is not None:
283            Writer.write_boolean(writer, 'positive', obj.positive)
284        if obj.priority is not None:
285            Writer.write_decimal(writer, 'priority', obj.priority)
286        if obj.vms_rule is not None:
287            AffinityRuleWriter.write_one(obj.vms_rule, writer, 'vms_rule')
288        if obj.cluster is not None:
289            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
290        if obj.host_labels is not None:
291            AffinityLabelWriter.write_many(obj.host_labels, writer, 'affinity_label', 'host_labels')
292        if obj.hosts is not None:
293            HostWriter.write_many(obj.hosts, writer, 'host', 'hosts')
294        if obj.vm_labels is not None:
295            AffinityLabelWriter.write_many(obj.vm_labels, writer, 'affinity_label', 'vm_labels')
296        if obj.vms is not None:
297            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
298        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
300    @staticmethod
301    def write_many(objs, writer, singular=None, plural=None):
302        if singular is None:
303            singular = 'affinity_group'
304        if plural is None:
305            plural = 'affinity_groups'
306        writer.write_start(plural)
307        if type(objs) == List:
308            href = objs.href
309            if href is not None:
310                writer.write_attribute('href', href)
311        for obj in objs:
312            AffinityGroupWriter.write_one(obj, writer, singular)
313        writer.write_end()
class AffinityLabelWriter(ovirtsdk4.writer.Writer):
316class AffinityLabelWriter(Writer):
317
318    def __init__(self):
319        super(AffinityLabelWriter, self).__init__()
320
321    @staticmethod
322    def write_one(obj, writer, singular=None):
323        if singular is None:
324            singular = 'affinity_label'
325        writer.write_start(singular)
326        href = obj.href
327        if href is not None:
328            writer.write_attribute('href', href)
329        if obj.id is not None:
330            writer.write_attribute('id', obj.id)
331        if obj.comment is not None:
332            Writer.write_string(writer, 'comment', obj.comment)
333        if obj.description is not None:
334            Writer.write_string(writer, 'description', obj.description)
335        if obj.has_implicit_affinity_group is not None:
336            Writer.write_boolean(writer, 'has_implicit_affinity_group', obj.has_implicit_affinity_group)
337        if obj.name is not None:
338            Writer.write_string(writer, 'name', obj.name)
339        if obj.read_only is not None:
340            Writer.write_boolean(writer, 'read_only', obj.read_only)
341        if obj.hosts is not None:
342            HostWriter.write_many(obj.hosts, writer, 'host', 'hosts')
343        if obj.vms is not None:
344            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
345        writer.write_end()
346
347    @staticmethod
348    def write_many(objs, writer, singular=None, plural=None):
349        if singular is None:
350            singular = 'affinity_label'
351        if plural is None:
352            plural = 'affinity_labels'
353        writer.write_start(plural)
354        if type(objs) == List:
355            href = objs.href
356            if href is not None:
357                writer.write_attribute('href', href)
358        for obj in objs:
359            AffinityLabelWriter.write_one(obj, writer, singular)
360        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

AffinityLabelWriter()
318    def __init__(self):
319        super(AffinityLabelWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
321    @staticmethod
322    def write_one(obj, writer, singular=None):
323        if singular is None:
324            singular = 'affinity_label'
325        writer.write_start(singular)
326        href = obj.href
327        if href is not None:
328            writer.write_attribute('href', href)
329        if obj.id is not None:
330            writer.write_attribute('id', obj.id)
331        if obj.comment is not None:
332            Writer.write_string(writer, 'comment', obj.comment)
333        if obj.description is not None:
334            Writer.write_string(writer, 'description', obj.description)
335        if obj.has_implicit_affinity_group is not None:
336            Writer.write_boolean(writer, 'has_implicit_affinity_group', obj.has_implicit_affinity_group)
337        if obj.name is not None:
338            Writer.write_string(writer, 'name', obj.name)
339        if obj.read_only is not None:
340            Writer.write_boolean(writer, 'read_only', obj.read_only)
341        if obj.hosts is not None:
342            HostWriter.write_many(obj.hosts, writer, 'host', 'hosts')
343        if obj.vms is not None:
344            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
345        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
347    @staticmethod
348    def write_many(objs, writer, singular=None, plural=None):
349        if singular is None:
350            singular = 'affinity_label'
351        if plural is None:
352            plural = 'affinity_labels'
353        writer.write_start(plural)
354        if type(objs) == List:
355            href = objs.href
356            if href is not None:
357                writer.write_attribute('href', href)
358        for obj in objs:
359            AffinityLabelWriter.write_one(obj, writer, singular)
360        writer.write_end()
class AffinityRuleWriter(ovirtsdk4.writer.Writer):
363class AffinityRuleWriter(Writer):
364
365    def __init__(self):
366        super(AffinityRuleWriter, self).__init__()
367
368    @staticmethod
369    def write_one(obj, writer, singular=None):
370        if singular is None:
371            singular = 'affinity_rule'
372        writer.write_start(singular)
373        href = obj.href
374        if href is not None:
375            writer.write_attribute('href', href)
376        if obj.enabled is not None:
377            Writer.write_boolean(writer, 'enabled', obj.enabled)
378        if obj.enforcing is not None:
379            Writer.write_boolean(writer, 'enforcing', obj.enforcing)
380        if obj.positive is not None:
381            Writer.write_boolean(writer, 'positive', obj.positive)
382        writer.write_end()
383
384    @staticmethod
385    def write_many(objs, writer, singular=None, plural=None):
386        if singular is None:
387            singular = 'affinity_rule'
388        if plural is None:
389            plural = 'affinity_rules'
390        writer.write_start(plural)
391        if type(objs) == List:
392            href = objs.href
393            if href is not None:
394                writer.write_attribute('href', href)
395        for obj in objs:
396            AffinityRuleWriter.write_one(obj, writer, singular)
397        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

AffinityRuleWriter()
365    def __init__(self):
366        super(AffinityRuleWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
368    @staticmethod
369    def write_one(obj, writer, singular=None):
370        if singular is None:
371            singular = 'affinity_rule'
372        writer.write_start(singular)
373        href = obj.href
374        if href is not None:
375            writer.write_attribute('href', href)
376        if obj.enabled is not None:
377            Writer.write_boolean(writer, 'enabled', obj.enabled)
378        if obj.enforcing is not None:
379            Writer.write_boolean(writer, 'enforcing', obj.enforcing)
380        if obj.positive is not None:
381            Writer.write_boolean(writer, 'positive', obj.positive)
382        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
384    @staticmethod
385    def write_many(objs, writer, singular=None, plural=None):
386        if singular is None:
387            singular = 'affinity_rule'
388        if plural is None:
389            plural = 'affinity_rules'
390        writer.write_start(plural)
391        if type(objs) == List:
392            href = objs.href
393            if href is not None:
394                writer.write_attribute('href', href)
395        for obj in objs:
396            AffinityRuleWriter.write_one(obj, writer, singular)
397        writer.write_end()
class AgentWriter(ovirtsdk4.writer.Writer):
400class AgentWriter(Writer):
401
402    def __init__(self):
403        super(AgentWriter, self).__init__()
404
405    @staticmethod
406    def write_one(obj, writer, singular=None):
407        if singular is None:
408            singular = 'agent'
409        writer.write_start(singular)
410        href = obj.href
411        if href is not None:
412            writer.write_attribute('href', href)
413        if obj.id is not None:
414            writer.write_attribute('id', obj.id)
415        if obj.address is not None:
416            Writer.write_string(writer, 'address', obj.address)
417        if obj.comment is not None:
418            Writer.write_string(writer, 'comment', obj.comment)
419        if obj.concurrent is not None:
420            Writer.write_boolean(writer, 'concurrent', obj.concurrent)
421        if obj.description is not None:
422            Writer.write_string(writer, 'description', obj.description)
423        if obj.encrypt_options is not None:
424            Writer.write_boolean(writer, 'encrypt_options', obj.encrypt_options)
425        if obj.name is not None:
426            Writer.write_string(writer, 'name', obj.name)
427        if obj.options is not None:
428            OptionWriter.write_many(obj.options, writer, 'option', 'options')
429        if obj.order is not None:
430            Writer.write_integer(writer, 'order', obj.order)
431        if obj.password is not None:
432            Writer.write_string(writer, 'password', obj.password)
433        if obj.port is not None:
434            Writer.write_integer(writer, 'port', obj.port)
435        if obj.type is not None:
436            Writer.write_string(writer, 'type', obj.type)
437        if obj.username is not None:
438            Writer.write_string(writer, 'username', obj.username)
439        if obj.host is not None:
440            HostWriter.write_one(obj.host, writer, 'host')
441        writer.write_end()
442
443    @staticmethod
444    def write_many(objs, writer, singular=None, plural=None):
445        if singular is None:
446            singular = 'agent'
447        if plural is None:
448            plural = 'agents'
449        writer.write_start(plural)
450        if type(objs) == List:
451            href = objs.href
452            if href is not None:
453                writer.write_attribute('href', href)
454        for obj in objs:
455            AgentWriter.write_one(obj, writer, singular)
456        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

AgentWriter()
402    def __init__(self):
403        super(AgentWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
405    @staticmethod
406    def write_one(obj, writer, singular=None):
407        if singular is None:
408            singular = 'agent'
409        writer.write_start(singular)
410        href = obj.href
411        if href is not None:
412            writer.write_attribute('href', href)
413        if obj.id is not None:
414            writer.write_attribute('id', obj.id)
415        if obj.address is not None:
416            Writer.write_string(writer, 'address', obj.address)
417        if obj.comment is not None:
418            Writer.write_string(writer, 'comment', obj.comment)
419        if obj.concurrent is not None:
420            Writer.write_boolean(writer, 'concurrent', obj.concurrent)
421        if obj.description is not None:
422            Writer.write_string(writer, 'description', obj.description)
423        if obj.encrypt_options is not None:
424            Writer.write_boolean(writer, 'encrypt_options', obj.encrypt_options)
425        if obj.name is not None:
426            Writer.write_string(writer, 'name', obj.name)
427        if obj.options is not None:
428            OptionWriter.write_many(obj.options, writer, 'option', 'options')
429        if obj.order is not None:
430            Writer.write_integer(writer, 'order', obj.order)
431        if obj.password is not None:
432            Writer.write_string(writer, 'password', obj.password)
433        if obj.port is not None:
434            Writer.write_integer(writer, 'port', obj.port)
435        if obj.type is not None:
436            Writer.write_string(writer, 'type', obj.type)
437        if obj.username is not None:
438            Writer.write_string(writer, 'username', obj.username)
439        if obj.host is not None:
440            HostWriter.write_one(obj.host, writer, 'host')
441        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
443    @staticmethod
444    def write_many(objs, writer, singular=None, plural=None):
445        if singular is None:
446            singular = 'agent'
447        if plural is None:
448            plural = 'agents'
449        writer.write_start(plural)
450        if type(objs) == List:
451            href = objs.href
452            if href is not None:
453                writer.write_attribute('href', href)
454        for obj in objs:
455            AgentWriter.write_one(obj, writer, singular)
456        writer.write_end()
class AgentConfigurationWriter(ovirtsdk4.writer.Writer):
459class AgentConfigurationWriter(Writer):
460
461    def __init__(self):
462        super(AgentConfigurationWriter, self).__init__()
463
464    @staticmethod
465    def write_one(obj, writer, singular=None):
466        if singular is None:
467            singular = 'agent_configuration'
468        writer.write_start(singular)
469        href = obj.href
470        if href is not None:
471            writer.write_attribute('href', href)
472        if obj.address is not None:
473            Writer.write_string(writer, 'address', obj.address)
474        if obj.broker_type is not None:
475            Writer.write_string(writer, 'broker_type', obj.broker_type.value)
476        if obj.network_mappings is not None:
477            Writer.write_string(writer, 'network_mappings', obj.network_mappings)
478        if obj.password is not None:
479            Writer.write_string(writer, 'password', obj.password)
480        if obj.port is not None:
481            Writer.write_integer(writer, 'port', obj.port)
482        if obj.username is not None:
483            Writer.write_string(writer, 'username', obj.username)
484        writer.write_end()
485
486    @staticmethod
487    def write_many(objs, writer, singular=None, plural=None):
488        if singular is None:
489            singular = 'agent_configuration'
490        if plural is None:
491            plural = 'agent_configurations'
492        writer.write_start(plural)
493        if type(objs) == List:
494            href = objs.href
495            if href is not None:
496                writer.write_attribute('href', href)
497        for obj in objs:
498            AgentConfigurationWriter.write_one(obj, writer, singular)
499        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

AgentConfigurationWriter()
461    def __init__(self):
462        super(AgentConfigurationWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
464    @staticmethod
465    def write_one(obj, writer, singular=None):
466        if singular is None:
467            singular = 'agent_configuration'
468        writer.write_start(singular)
469        href = obj.href
470        if href is not None:
471            writer.write_attribute('href', href)
472        if obj.address is not None:
473            Writer.write_string(writer, 'address', obj.address)
474        if obj.broker_type is not None:
475            Writer.write_string(writer, 'broker_type', obj.broker_type.value)
476        if obj.network_mappings is not None:
477            Writer.write_string(writer, 'network_mappings', obj.network_mappings)
478        if obj.password is not None:
479            Writer.write_string(writer, 'password', obj.password)
480        if obj.port is not None:
481            Writer.write_integer(writer, 'port', obj.port)
482        if obj.username is not None:
483            Writer.write_string(writer, 'username', obj.username)
484        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
486    @staticmethod
487    def write_many(objs, writer, singular=None, plural=None):
488        if singular is None:
489            singular = 'agent_configuration'
490        if plural is None:
491            plural = 'agent_configurations'
492        writer.write_start(plural)
493        if type(objs) == List:
494            href = objs.href
495            if href is not None:
496                writer.write_attribute('href', href)
497        for obj in objs:
498            AgentConfigurationWriter.write_one(obj, writer, singular)
499        writer.write_end()
class ApiWriter(ovirtsdk4.writer.Writer):
502class ApiWriter(Writer):
503
504    def __init__(self):
505        super(ApiWriter, self).__init__()
506
507    @staticmethod
508    def write_one(obj, writer, singular=None):
509        if singular is None:
510            singular = 'api'
511        writer.write_start(singular)
512        href = obj.href
513        if href is not None:
514            writer.write_attribute('href', href)
515        if obj.product_info is not None:
516            ProductInfoWriter.write_one(obj.product_info, writer, 'product_info')
517        if obj.special_objects is not None:
518            SpecialObjectsWriter.write_one(obj.special_objects, writer, 'special_objects')
519        if obj.summary is not None:
520            ApiSummaryWriter.write_one(obj.summary, writer, 'summary')
521        if obj.time is not None:
522            Writer.write_date(writer, 'time', obj.time)
523        if obj.authenticated_user is not None:
524            UserWriter.write_one(obj.authenticated_user, writer, 'authenticated_user')
525        if obj.effective_user is not None:
526            UserWriter.write_one(obj.effective_user, writer, 'effective_user')
527        writer.write_end()
528
529    @staticmethod
530    def write_many(objs, writer, singular=None, plural=None):
531        if singular is None:
532            singular = 'api'
533        if plural is None:
534            plural = 'apis'
535        writer.write_start(plural)
536        if type(objs) == List:
537            href = objs.href
538            if href is not None:
539                writer.write_attribute('href', href)
540        for obj in objs:
541            ApiWriter.write_one(obj, writer, singular)
542        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ApiWriter()
504    def __init__(self):
505        super(ApiWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
507    @staticmethod
508    def write_one(obj, writer, singular=None):
509        if singular is None:
510            singular = 'api'
511        writer.write_start(singular)
512        href = obj.href
513        if href is not None:
514            writer.write_attribute('href', href)
515        if obj.product_info is not None:
516            ProductInfoWriter.write_one(obj.product_info, writer, 'product_info')
517        if obj.special_objects is not None:
518            SpecialObjectsWriter.write_one(obj.special_objects, writer, 'special_objects')
519        if obj.summary is not None:
520            ApiSummaryWriter.write_one(obj.summary, writer, 'summary')
521        if obj.time is not None:
522            Writer.write_date(writer, 'time', obj.time)
523        if obj.authenticated_user is not None:
524            UserWriter.write_one(obj.authenticated_user, writer, 'authenticated_user')
525        if obj.effective_user is not None:
526            UserWriter.write_one(obj.effective_user, writer, 'effective_user')
527        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
529    @staticmethod
530    def write_many(objs, writer, singular=None, plural=None):
531        if singular is None:
532            singular = 'api'
533        if plural is None:
534            plural = 'apis'
535        writer.write_start(plural)
536        if type(objs) == List:
537            href = objs.href
538            if href is not None:
539                writer.write_attribute('href', href)
540        for obj in objs:
541            ApiWriter.write_one(obj, writer, singular)
542        writer.write_end()
class ApiSummaryWriter(ovirtsdk4.writer.Writer):
545class ApiSummaryWriter(Writer):
546
547    def __init__(self):
548        super(ApiSummaryWriter, self).__init__()
549
550    @staticmethod
551    def write_one(obj, writer, singular=None):
552        if singular is None:
553            singular = 'api_summary'
554        writer.write_start(singular)
555        href = obj.href
556        if href is not None:
557            writer.write_attribute('href', href)
558        if obj.hosts is not None:
559            ApiSummaryItemWriter.write_one(obj.hosts, writer, 'hosts')
560        if obj.storage_domains is not None:
561            ApiSummaryItemWriter.write_one(obj.storage_domains, writer, 'storage_domains')
562        if obj.users is not None:
563            ApiSummaryItemWriter.write_one(obj.users, writer, 'users')
564        if obj.vms is not None:
565            ApiSummaryItemWriter.write_one(obj.vms, writer, 'vms')
566        writer.write_end()
567
568    @staticmethod
569    def write_many(objs, writer, singular=None, plural=None):
570        if singular is None:
571            singular = 'api_summary'
572        if plural is None:
573            plural = 'api_summaries'
574        writer.write_start(plural)
575        if type(objs) == List:
576            href = objs.href
577            if href is not None:
578                writer.write_attribute('href', href)
579        for obj in objs:
580            ApiSummaryWriter.write_one(obj, writer, singular)
581        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ApiSummaryWriter()
547    def __init__(self):
548        super(ApiSummaryWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
550    @staticmethod
551    def write_one(obj, writer, singular=None):
552        if singular is None:
553            singular = 'api_summary'
554        writer.write_start(singular)
555        href = obj.href
556        if href is not None:
557            writer.write_attribute('href', href)
558        if obj.hosts is not None:
559            ApiSummaryItemWriter.write_one(obj.hosts, writer, 'hosts')
560        if obj.storage_domains is not None:
561            ApiSummaryItemWriter.write_one(obj.storage_domains, writer, 'storage_domains')
562        if obj.users is not None:
563            ApiSummaryItemWriter.write_one(obj.users, writer, 'users')
564        if obj.vms is not None:
565            ApiSummaryItemWriter.write_one(obj.vms, writer, 'vms')
566        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
568    @staticmethod
569    def write_many(objs, writer, singular=None, plural=None):
570        if singular is None:
571            singular = 'api_summary'
572        if plural is None:
573            plural = 'api_summaries'
574        writer.write_start(plural)
575        if type(objs) == List:
576            href = objs.href
577            if href is not None:
578                writer.write_attribute('href', href)
579        for obj in objs:
580            ApiSummaryWriter.write_one(obj, writer, singular)
581        writer.write_end()
class ApiSummaryItemWriter(ovirtsdk4.writer.Writer):
584class ApiSummaryItemWriter(Writer):
585
586    def __init__(self):
587        super(ApiSummaryItemWriter, self).__init__()
588
589    @staticmethod
590    def write_one(obj, writer, singular=None):
591        if singular is None:
592            singular = 'api_summary_item'
593        writer.write_start(singular)
594        href = obj.href
595        if href is not None:
596            writer.write_attribute('href', href)
597        if obj.active is not None:
598            Writer.write_integer(writer, 'active', obj.active)
599        if obj.total is not None:
600            Writer.write_integer(writer, 'total', obj.total)
601        writer.write_end()
602
603    @staticmethod
604    def write_many(objs, writer, singular=None, plural=None):
605        if singular is None:
606            singular = 'api_summary_item'
607        if plural is None:
608            plural = 'api_summary_items'
609        writer.write_start(plural)
610        if type(objs) == List:
611            href = objs.href
612            if href is not None:
613                writer.write_attribute('href', href)
614        for obj in objs:
615            ApiSummaryItemWriter.write_one(obj, writer, singular)
616        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ApiSummaryItemWriter()
586    def __init__(self):
587        super(ApiSummaryItemWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
589    @staticmethod
590    def write_one(obj, writer, singular=None):
591        if singular is None:
592            singular = 'api_summary_item'
593        writer.write_start(singular)
594        href = obj.href
595        if href is not None:
596            writer.write_attribute('href', href)
597        if obj.active is not None:
598            Writer.write_integer(writer, 'active', obj.active)
599        if obj.total is not None:
600            Writer.write_integer(writer, 'total', obj.total)
601        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
603    @staticmethod
604    def write_many(objs, writer, singular=None, plural=None):
605        if singular is None:
606            singular = 'api_summary_item'
607        if plural is None:
608            plural = 'api_summary_items'
609        writer.write_start(plural)
610        if type(objs) == List:
611            href = objs.href
612            if href is not None:
613                writer.write_attribute('href', href)
614        for obj in objs:
615            ApiSummaryItemWriter.write_one(obj, writer, singular)
616        writer.write_end()
class ApplicationWriter(ovirtsdk4.writer.Writer):
619class ApplicationWriter(Writer):
620
621    def __init__(self):
622        super(ApplicationWriter, self).__init__()
623
624    @staticmethod
625    def write_one(obj, writer, singular=None):
626        if singular is None:
627            singular = 'application'
628        writer.write_start(singular)
629        href = obj.href
630        if href is not None:
631            writer.write_attribute('href', href)
632        if obj.id is not None:
633            writer.write_attribute('id', obj.id)
634        if obj.comment is not None:
635            Writer.write_string(writer, 'comment', obj.comment)
636        if obj.description is not None:
637            Writer.write_string(writer, 'description', obj.description)
638        if obj.name is not None:
639            Writer.write_string(writer, 'name', obj.name)
640        if obj.vm is not None:
641            VmWriter.write_one(obj.vm, writer, 'vm')
642        writer.write_end()
643
644    @staticmethod
645    def write_many(objs, writer, singular=None, plural=None):
646        if singular is None:
647            singular = 'application'
648        if plural is None:
649            plural = 'applications'
650        writer.write_start(plural)
651        if type(objs) == List:
652            href = objs.href
653            if href is not None:
654                writer.write_attribute('href', href)
655        for obj in objs:
656            ApplicationWriter.write_one(obj, writer, singular)
657        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ApplicationWriter()
621    def __init__(self):
622        super(ApplicationWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
624    @staticmethod
625    def write_one(obj, writer, singular=None):
626        if singular is None:
627            singular = 'application'
628        writer.write_start(singular)
629        href = obj.href
630        if href is not None:
631            writer.write_attribute('href', href)
632        if obj.id is not None:
633            writer.write_attribute('id', obj.id)
634        if obj.comment is not None:
635            Writer.write_string(writer, 'comment', obj.comment)
636        if obj.description is not None:
637            Writer.write_string(writer, 'description', obj.description)
638        if obj.name is not None:
639            Writer.write_string(writer, 'name', obj.name)
640        if obj.vm is not None:
641            VmWriter.write_one(obj.vm, writer, 'vm')
642        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
644    @staticmethod
645    def write_many(objs, writer, singular=None, plural=None):
646        if singular is None:
647            singular = 'application'
648        if plural is None:
649            plural = 'applications'
650        writer.write_start(plural)
651        if type(objs) == List:
652            href = objs.href
653            if href is not None:
654                writer.write_attribute('href', href)
655        for obj in objs:
656            ApplicationWriter.write_one(obj, writer, singular)
657        writer.write_end()
class AuthorizedKeyWriter(ovirtsdk4.writer.Writer):
660class AuthorizedKeyWriter(Writer):
661
662    def __init__(self):
663        super(AuthorizedKeyWriter, self).__init__()
664
665    @staticmethod
666    def write_one(obj, writer, singular=None):
667        if singular is None:
668            singular = 'authorized_key'
669        writer.write_start(singular)
670        href = obj.href
671        if href is not None:
672            writer.write_attribute('href', href)
673        if obj.id is not None:
674            writer.write_attribute('id', obj.id)
675        if obj.comment is not None:
676            Writer.write_string(writer, 'comment', obj.comment)
677        if obj.description is not None:
678            Writer.write_string(writer, 'description', obj.description)
679        if obj.key is not None:
680            Writer.write_string(writer, 'key', obj.key)
681        if obj.name is not None:
682            Writer.write_string(writer, 'name', obj.name)
683        if obj.user is not None:
684            UserWriter.write_one(obj.user, writer, 'user')
685        writer.write_end()
686
687    @staticmethod
688    def write_many(objs, writer, singular=None, plural=None):
689        if singular is None:
690            singular = 'authorized_key'
691        if plural is None:
692            plural = 'authorized_keys'
693        writer.write_start(plural)
694        if type(objs) == List:
695            href = objs.href
696            if href is not None:
697                writer.write_attribute('href', href)
698        for obj in objs:
699            AuthorizedKeyWriter.write_one(obj, writer, singular)
700        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

AuthorizedKeyWriter()
662    def __init__(self):
663        super(AuthorizedKeyWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
665    @staticmethod
666    def write_one(obj, writer, singular=None):
667        if singular is None:
668            singular = 'authorized_key'
669        writer.write_start(singular)
670        href = obj.href
671        if href is not None:
672            writer.write_attribute('href', href)
673        if obj.id is not None:
674            writer.write_attribute('id', obj.id)
675        if obj.comment is not None:
676            Writer.write_string(writer, 'comment', obj.comment)
677        if obj.description is not None:
678            Writer.write_string(writer, 'description', obj.description)
679        if obj.key is not None:
680            Writer.write_string(writer, 'key', obj.key)
681        if obj.name is not None:
682            Writer.write_string(writer, 'name', obj.name)
683        if obj.user is not None:
684            UserWriter.write_one(obj.user, writer, 'user')
685        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
687    @staticmethod
688    def write_many(objs, writer, singular=None, plural=None):
689        if singular is None:
690            singular = 'authorized_key'
691        if plural is None:
692            plural = 'authorized_keys'
693        writer.write_start(plural)
694        if type(objs) == List:
695            href = objs.href
696            if href is not None:
697                writer.write_attribute('href', href)
698        for obj in objs:
699            AuthorizedKeyWriter.write_one(obj, writer, singular)
700        writer.write_end()
class BackupWriter(ovirtsdk4.writer.Writer):
703class BackupWriter(Writer):
704
705    def __init__(self):
706        super(BackupWriter, self).__init__()
707
708    @staticmethod
709    def write_one(obj, writer, singular=None):
710        if singular is None:
711            singular = 'backup'
712        writer.write_start(singular)
713        href = obj.href
714        if href is not None:
715            writer.write_attribute('href', href)
716        if obj.id is not None:
717            writer.write_attribute('id', obj.id)
718        if obj.comment is not None:
719            Writer.write_string(writer, 'comment', obj.comment)
720        if obj.creation_date is not None:
721            Writer.write_date(writer, 'creation_date', obj.creation_date)
722        if obj.description is not None:
723            Writer.write_string(writer, 'description', obj.description)
724        if obj.from_checkpoint_id is not None:
725            Writer.write_string(writer, 'from_checkpoint_id', obj.from_checkpoint_id)
726        if obj.modification_date is not None:
727            Writer.write_date(writer, 'modification_date', obj.modification_date)
728        if obj.name is not None:
729            Writer.write_string(writer, 'name', obj.name)
730        if obj.phase is not None:
731            Writer.write_string(writer, 'phase', obj.phase.value)
732        if obj.to_checkpoint_id is not None:
733            Writer.write_string(writer, 'to_checkpoint_id', obj.to_checkpoint_id)
734        if obj.disks is not None:
735            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
736        if obj.host is not None:
737            HostWriter.write_one(obj.host, writer, 'host')
738        if obj.snapshot is not None:
739            SnapshotWriter.write_one(obj.snapshot, writer, 'snapshot')
740        if obj.vm is not None:
741            VmWriter.write_one(obj.vm, writer, 'vm')
742        writer.write_end()
743
744    @staticmethod
745    def write_many(objs, writer, singular=None, plural=None):
746        if singular is None:
747            singular = 'backup'
748        if plural is None:
749            plural = 'backups'
750        writer.write_start(plural)
751        if type(objs) == List:
752            href = objs.href
753            if href is not None:
754                writer.write_attribute('href', href)
755        for obj in objs:
756            BackupWriter.write_one(obj, writer, singular)
757        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

BackupWriter()
705    def __init__(self):
706        super(BackupWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
708    @staticmethod
709    def write_one(obj, writer, singular=None):
710        if singular is None:
711            singular = 'backup'
712        writer.write_start(singular)
713        href = obj.href
714        if href is not None:
715            writer.write_attribute('href', href)
716        if obj.id is not None:
717            writer.write_attribute('id', obj.id)
718        if obj.comment is not None:
719            Writer.write_string(writer, 'comment', obj.comment)
720        if obj.creation_date is not None:
721            Writer.write_date(writer, 'creation_date', obj.creation_date)
722        if obj.description is not None:
723            Writer.write_string(writer, 'description', obj.description)
724        if obj.from_checkpoint_id is not None:
725            Writer.write_string(writer, 'from_checkpoint_id', obj.from_checkpoint_id)
726        if obj.modification_date is not None:
727            Writer.write_date(writer, 'modification_date', obj.modification_date)
728        if obj.name is not None:
729            Writer.write_string(writer, 'name', obj.name)
730        if obj.phase is not None:
731            Writer.write_string(writer, 'phase', obj.phase.value)
732        if obj.to_checkpoint_id is not None:
733            Writer.write_string(writer, 'to_checkpoint_id', obj.to_checkpoint_id)
734        if obj.disks is not None:
735            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
736        if obj.host is not None:
737            HostWriter.write_one(obj.host, writer, 'host')
738        if obj.snapshot is not None:
739            SnapshotWriter.write_one(obj.snapshot, writer, 'snapshot')
740        if obj.vm is not None:
741            VmWriter.write_one(obj.vm, writer, 'vm')
742        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
744    @staticmethod
745    def write_many(objs, writer, singular=None, plural=None):
746        if singular is None:
747            singular = 'backup'
748        if plural is None:
749            plural = 'backups'
750        writer.write_start(plural)
751        if type(objs) == List:
752            href = objs.href
753            if href is not None:
754                writer.write_attribute('href', href)
755        for obj in objs:
756            BackupWriter.write_one(obj, writer, singular)
757        writer.write_end()
class BalanceWriter(ovirtsdk4.writer.Writer):
760class BalanceWriter(Writer):
761
762    def __init__(self):
763        super(BalanceWriter, self).__init__()
764
765    @staticmethod
766    def write_one(obj, writer, singular=None):
767        if singular is None:
768            singular = 'balance'
769        writer.write_start(singular)
770        href = obj.href
771        if href is not None:
772            writer.write_attribute('href', href)
773        if obj.id is not None:
774            writer.write_attribute('id', obj.id)
775        if obj.comment is not None:
776            Writer.write_string(writer, 'comment', obj.comment)
777        if obj.description is not None:
778            Writer.write_string(writer, 'description', obj.description)
779        if obj.name is not None:
780            Writer.write_string(writer, 'name', obj.name)
781        if obj.scheduling_policy is not None:
782            SchedulingPolicyWriter.write_one(obj.scheduling_policy, writer, 'scheduling_policy')
783        if obj.scheduling_policy_unit is not None:
784            SchedulingPolicyUnitWriter.write_one(obj.scheduling_policy_unit, writer, 'scheduling_policy_unit')
785        writer.write_end()
786
787    @staticmethod
788    def write_many(objs, writer, singular=None, plural=None):
789        if singular is None:
790            singular = 'balance'
791        if plural is None:
792            plural = 'balances'
793        writer.write_start(plural)
794        if type(objs) == List:
795            href = objs.href
796            if href is not None:
797                writer.write_attribute('href', href)
798        for obj in objs:
799            BalanceWriter.write_one(obj, writer, singular)
800        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

BalanceWriter()
762    def __init__(self):
763        super(BalanceWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
765    @staticmethod
766    def write_one(obj, writer, singular=None):
767        if singular is None:
768            singular = 'balance'
769        writer.write_start(singular)
770        href = obj.href
771        if href is not None:
772            writer.write_attribute('href', href)
773        if obj.id is not None:
774            writer.write_attribute('id', obj.id)
775        if obj.comment is not None:
776            Writer.write_string(writer, 'comment', obj.comment)
777        if obj.description is not None:
778            Writer.write_string(writer, 'description', obj.description)
779        if obj.name is not None:
780            Writer.write_string(writer, 'name', obj.name)
781        if obj.scheduling_policy is not None:
782            SchedulingPolicyWriter.write_one(obj.scheduling_policy, writer, 'scheduling_policy')
783        if obj.scheduling_policy_unit is not None:
784            SchedulingPolicyUnitWriter.write_one(obj.scheduling_policy_unit, writer, 'scheduling_policy_unit')
785        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
787    @staticmethod
788    def write_many(objs, writer, singular=None, plural=None):
789        if singular is None:
790            singular = 'balance'
791        if plural is None:
792            plural = 'balances'
793        writer.write_start(plural)
794        if type(objs) == List:
795            href = objs.href
796            if href is not None:
797                writer.write_attribute('href', href)
798        for obj in objs:
799            BalanceWriter.write_one(obj, writer, singular)
800        writer.write_end()
class BiosWriter(ovirtsdk4.writer.Writer):
803class BiosWriter(Writer):
804
805    def __init__(self):
806        super(BiosWriter, self).__init__()
807
808    @staticmethod
809    def write_one(obj, writer, singular=None):
810        if singular is None:
811            singular = 'bios'
812        writer.write_start(singular)
813        href = obj.href
814        if href is not None:
815            writer.write_attribute('href', href)
816        if obj.boot_menu is not None:
817            BootMenuWriter.write_one(obj.boot_menu, writer, 'boot_menu')
818        if obj.type is not None:
819            Writer.write_string(writer, 'type', obj.type.value)
820        writer.write_end()
821
822    @staticmethod
823    def write_many(objs, writer, singular=None, plural=None):
824        if singular is None:
825            singular = 'bios'
826        if plural is None:
827            plural = 'bioss'
828        writer.write_start(plural)
829        if type(objs) == List:
830            href = objs.href
831            if href is not None:
832                writer.write_attribute('href', href)
833        for obj in objs:
834            BiosWriter.write_one(obj, writer, singular)
835        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

BiosWriter()
805    def __init__(self):
806        super(BiosWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
808    @staticmethod
809    def write_one(obj, writer, singular=None):
810        if singular is None:
811            singular = 'bios'
812        writer.write_start(singular)
813        href = obj.href
814        if href is not None:
815            writer.write_attribute('href', href)
816        if obj.boot_menu is not None:
817            BootMenuWriter.write_one(obj.boot_menu, writer, 'boot_menu')
818        if obj.type is not None:
819            Writer.write_string(writer, 'type', obj.type.value)
820        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
822    @staticmethod
823    def write_many(objs, writer, singular=None, plural=None):
824        if singular is None:
825            singular = 'bios'
826        if plural is None:
827            plural = 'bioss'
828        writer.write_start(plural)
829        if type(objs) == List:
830            href = objs.href
831            if href is not None:
832                writer.write_attribute('href', href)
833        for obj in objs:
834            BiosWriter.write_one(obj, writer, singular)
835        writer.write_end()
class BlockStatisticWriter(ovirtsdk4.writer.Writer):
838class BlockStatisticWriter(Writer):
839
840    def __init__(self):
841        super(BlockStatisticWriter, self).__init__()
842
843    @staticmethod
844    def write_one(obj, writer, singular=None):
845        if singular is None:
846            singular = 'block_statistic'
847        writer.write_start(singular)
848        href = obj.href
849        if href is not None:
850            writer.write_attribute('href', href)
851        if obj.statistics is not None:
852            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
853        writer.write_end()
854
855    @staticmethod
856    def write_many(objs, writer, singular=None, plural=None):
857        if singular is None:
858            singular = 'block_statistic'
859        if plural is None:
860            plural = 'block_statistics'
861        writer.write_start(plural)
862        if type(objs) == List:
863            href = objs.href
864            if href is not None:
865                writer.write_attribute('href', href)
866        for obj in objs:
867            BlockStatisticWriter.write_one(obj, writer, singular)
868        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

BlockStatisticWriter()
840    def __init__(self):
841        super(BlockStatisticWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
843    @staticmethod
844    def write_one(obj, writer, singular=None):
845        if singular is None:
846            singular = 'block_statistic'
847        writer.write_start(singular)
848        href = obj.href
849        if href is not None:
850            writer.write_attribute('href', href)
851        if obj.statistics is not None:
852            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
853        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
855    @staticmethod
856    def write_many(objs, writer, singular=None, plural=None):
857        if singular is None:
858            singular = 'block_statistic'
859        if plural is None:
860            plural = 'block_statistics'
861        writer.write_start(plural)
862        if type(objs) == List:
863            href = objs.href
864            if href is not None:
865                writer.write_attribute('href', href)
866        for obj in objs:
867            BlockStatisticWriter.write_one(obj, writer, singular)
868        writer.write_end()
class BondingWriter(ovirtsdk4.writer.Writer):
871class BondingWriter(Writer):
872
873    def __init__(self):
874        super(BondingWriter, self).__init__()
875
876    @staticmethod
877    def write_one(obj, writer, singular=None):
878        if singular is None:
879            singular = 'bonding'
880        writer.write_start(singular)
881        href = obj.href
882        if href is not None:
883            writer.write_attribute('href', href)
884        if obj.ad_partner_mac is not None:
885            MacWriter.write_one(obj.ad_partner_mac, writer, 'ad_partner_mac')
886        if obj.options is not None:
887            OptionWriter.write_many(obj.options, writer, 'option', 'options')
888        if obj.slaves is not None:
889            HostNicWriter.write_many(obj.slaves, writer, 'host_nic', 'slaves')
890        if obj.active_slave is not None:
891            HostNicWriter.write_one(obj.active_slave, writer, 'active_slave')
892        writer.write_end()
893
894    @staticmethod
895    def write_many(objs, writer, singular=None, plural=None):
896        if singular is None:
897            singular = 'bonding'
898        if plural is None:
899            plural = 'bondings'
900        writer.write_start(plural)
901        if type(objs) == List:
902            href = objs.href
903            if href is not None:
904                writer.write_attribute('href', href)
905        for obj in objs:
906            BondingWriter.write_one(obj, writer, singular)
907        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

BondingWriter()
873    def __init__(self):
874        super(BondingWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
876    @staticmethod
877    def write_one(obj, writer, singular=None):
878        if singular is None:
879            singular = 'bonding'
880        writer.write_start(singular)
881        href = obj.href
882        if href is not None:
883            writer.write_attribute('href', href)
884        if obj.ad_partner_mac is not None:
885            MacWriter.write_one(obj.ad_partner_mac, writer, 'ad_partner_mac')
886        if obj.options is not None:
887            OptionWriter.write_many(obj.options, writer, 'option', 'options')
888        if obj.slaves is not None:
889            HostNicWriter.write_many(obj.slaves, writer, 'host_nic', 'slaves')
890        if obj.active_slave is not None:
891            HostNicWriter.write_one(obj.active_slave, writer, 'active_slave')
892        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
894    @staticmethod
895    def write_many(objs, writer, singular=None, plural=None):
896        if singular is None:
897            singular = 'bonding'
898        if plural is None:
899            plural = 'bondings'
900        writer.write_start(plural)
901        if type(objs) == List:
902            href = objs.href
903            if href is not None:
904                writer.write_attribute('href', href)
905        for obj in objs:
906            BondingWriter.write_one(obj, writer, singular)
907        writer.write_end()
class BookmarkWriter(ovirtsdk4.writer.Writer):
910class BookmarkWriter(Writer):
911
912    def __init__(self):
913        super(BookmarkWriter, self).__init__()
914
915    @staticmethod
916    def write_one(obj, writer, singular=None):
917        if singular is None:
918            singular = 'bookmark'
919        writer.write_start(singular)
920        href = obj.href
921        if href is not None:
922            writer.write_attribute('href', href)
923        if obj.id is not None:
924            writer.write_attribute('id', obj.id)
925        if obj.comment is not None:
926            Writer.write_string(writer, 'comment', obj.comment)
927        if obj.description is not None:
928            Writer.write_string(writer, 'description', obj.description)
929        if obj.name is not None:
930            Writer.write_string(writer, 'name', obj.name)
931        if obj.value is not None:
932            Writer.write_string(writer, 'value', obj.value)
933        writer.write_end()
934
935    @staticmethod
936    def write_many(objs, writer, singular=None, plural=None):
937        if singular is None:
938            singular = 'bookmark'
939        if plural is None:
940            plural = 'bookmarks'
941        writer.write_start(plural)
942        if type(objs) == List:
943            href = objs.href
944            if href is not None:
945                writer.write_attribute('href', href)
946        for obj in objs:
947            BookmarkWriter.write_one(obj, writer, singular)
948        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

BookmarkWriter()
912    def __init__(self):
913        super(BookmarkWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
915    @staticmethod
916    def write_one(obj, writer, singular=None):
917        if singular is None:
918            singular = 'bookmark'
919        writer.write_start(singular)
920        href = obj.href
921        if href is not None:
922            writer.write_attribute('href', href)
923        if obj.id is not None:
924            writer.write_attribute('id', obj.id)
925        if obj.comment is not None:
926            Writer.write_string(writer, 'comment', obj.comment)
927        if obj.description is not None:
928            Writer.write_string(writer, 'description', obj.description)
929        if obj.name is not None:
930            Writer.write_string(writer, 'name', obj.name)
931        if obj.value is not None:
932            Writer.write_string(writer, 'value', obj.value)
933        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
935    @staticmethod
936    def write_many(objs, writer, singular=None, plural=None):
937        if singular is None:
938            singular = 'bookmark'
939        if plural is None:
940            plural = 'bookmarks'
941        writer.write_start(plural)
942        if type(objs) == List:
943            href = objs.href
944            if href is not None:
945                writer.write_attribute('href', href)
946        for obj in objs:
947            BookmarkWriter.write_one(obj, writer, singular)
948        writer.write_end()
class BootWriter(ovirtsdk4.writer.Writer):
951class BootWriter(Writer):
952
953    def __init__(self):
954        super(BootWriter, self).__init__()
955
956    @staticmethod
957    def write_one(obj, writer, singular=None):
958        if singular is None:
959            singular = 'boot'
960        writer.write_start(singular)
961        href = obj.href
962        if href is not None:
963            writer.write_attribute('href', href)
964        if obj.devices is not None:
965            writer.write_start('devices')
966            for item in obj.devices:
967                if item is not None:
968                    Writer.write_string(writer, 'device', item.value)
969            writer.write_end()
970        writer.write_end()
971
972    @staticmethod
973    def write_many(objs, writer, singular=None, plural=None):
974        if singular is None:
975            singular = 'boot'
976        if plural is None:
977            plural = 'boots'
978        writer.write_start(plural)
979        if type(objs) == List:
980            href = objs.href
981            if href is not None:
982                writer.write_attribute('href', href)
983        for obj in objs:
984            BootWriter.write_one(obj, writer, singular)
985        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

BootWriter()
953    def __init__(self):
954        super(BootWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
956    @staticmethod
957    def write_one(obj, writer, singular=None):
958        if singular is None:
959            singular = 'boot'
960        writer.write_start(singular)
961        href = obj.href
962        if href is not None:
963            writer.write_attribute('href', href)
964        if obj.devices is not None:
965            writer.write_start('devices')
966            for item in obj.devices:
967                if item is not None:
968                    Writer.write_string(writer, 'device', item.value)
969            writer.write_end()
970        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
972    @staticmethod
973    def write_many(objs, writer, singular=None, plural=None):
974        if singular is None:
975            singular = 'boot'
976        if plural is None:
977            plural = 'boots'
978        writer.write_start(plural)
979        if type(objs) == List:
980            href = objs.href
981            if href is not None:
982                writer.write_attribute('href', href)
983        for obj in objs:
984            BootWriter.write_one(obj, writer, singular)
985        writer.write_end()
class BootMenuWriter(ovirtsdk4.writer.Writer):
 988class BootMenuWriter(Writer):
 989
 990    def __init__(self):
 991        super(BootMenuWriter, self).__init__()
 992
 993    @staticmethod
 994    def write_one(obj, writer, singular=None):
 995        if singular is None:
 996            singular = 'boot_menu'
 997        writer.write_start(singular)
 998        href = obj.href
 999        if href is not None:
1000            writer.write_attribute('href', href)
1001        if obj.enabled is not None:
1002            Writer.write_boolean(writer, 'enabled', obj.enabled)
1003        writer.write_end()
1004
1005    @staticmethod
1006    def write_many(objs, writer, singular=None, plural=None):
1007        if singular is None:
1008            singular = 'boot_menu'
1009        if plural is None:
1010            plural = 'boot_menus'
1011        writer.write_start(plural)
1012        if type(objs) == List:
1013            href = objs.href
1014            if href is not None:
1015                writer.write_attribute('href', href)
1016        for obj in objs:
1017            BootMenuWriter.write_one(obj, writer, singular)
1018        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

BootMenuWriter()
990    def __init__(self):
991        super(BootMenuWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
 993    @staticmethod
 994    def write_one(obj, writer, singular=None):
 995        if singular is None:
 996            singular = 'boot_menu'
 997        writer.write_start(singular)
 998        href = obj.href
 999        if href is not None:
1000            writer.write_attribute('href', href)
1001        if obj.enabled is not None:
1002            Writer.write_boolean(writer, 'enabled', obj.enabled)
1003        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1005    @staticmethod
1006    def write_many(objs, writer, singular=None, plural=None):
1007        if singular is None:
1008            singular = 'boot_menu'
1009        if plural is None:
1010            plural = 'boot_menus'
1011        writer.write_start(plural)
1012        if type(objs) == List:
1013            href = objs.href
1014            if href is not None:
1015                writer.write_attribute('href', href)
1016        for obj in objs:
1017            BootMenuWriter.write_one(obj, writer, singular)
1018        writer.write_end()
class BrickProfileDetailWriter(ovirtsdk4.writer.Writer):
1021class BrickProfileDetailWriter(Writer):
1022
1023    def __init__(self):
1024        super(BrickProfileDetailWriter, self).__init__()
1025
1026    @staticmethod
1027    def write_one(obj, writer, singular=None):
1028        if singular is None:
1029            singular = 'brick_profile_detail'
1030        writer.write_start(singular)
1031        href = obj.href
1032        if href is not None:
1033            writer.write_attribute('href', href)
1034        if obj.profile_details is not None:
1035            ProfileDetailWriter.write_many(obj.profile_details, writer, 'profile_detail', 'profile_details')
1036        if obj.brick is not None:
1037            GlusterBrickWriter.write_one(obj.brick, writer, 'brick')
1038        writer.write_end()
1039
1040    @staticmethod
1041    def write_many(objs, writer, singular=None, plural=None):
1042        if singular is None:
1043            singular = 'brick_profile_detail'
1044        if plural is None:
1045            plural = 'brick_profile_details'
1046        writer.write_start(plural)
1047        if type(objs) == List:
1048            href = objs.href
1049            if href is not None:
1050                writer.write_attribute('href', href)
1051        for obj in objs:
1052            BrickProfileDetailWriter.write_one(obj, writer, singular)
1053        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

BrickProfileDetailWriter()
1023    def __init__(self):
1024        super(BrickProfileDetailWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1026    @staticmethod
1027    def write_one(obj, writer, singular=None):
1028        if singular is None:
1029            singular = 'brick_profile_detail'
1030        writer.write_start(singular)
1031        href = obj.href
1032        if href is not None:
1033            writer.write_attribute('href', href)
1034        if obj.profile_details is not None:
1035            ProfileDetailWriter.write_many(obj.profile_details, writer, 'profile_detail', 'profile_details')
1036        if obj.brick is not None:
1037            GlusterBrickWriter.write_one(obj.brick, writer, 'brick')
1038        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1040    @staticmethod
1041    def write_many(objs, writer, singular=None, plural=None):
1042        if singular is None:
1043            singular = 'brick_profile_detail'
1044        if plural is None:
1045            plural = 'brick_profile_details'
1046        writer.write_start(plural)
1047        if type(objs) == List:
1048            href = objs.href
1049            if href is not None:
1050                writer.write_attribute('href', href)
1051        for obj in objs:
1052            BrickProfileDetailWriter.write_one(obj, writer, singular)
1053        writer.write_end()
class CdromWriter(ovirtsdk4.writer.Writer):
1056class CdromWriter(Writer):
1057
1058    def __init__(self):
1059        super(CdromWriter, self).__init__()
1060
1061    @staticmethod
1062    def write_one(obj, writer, singular=None):
1063        if singular is None:
1064            singular = 'cdrom'
1065        writer.write_start(singular)
1066        href = obj.href
1067        if href is not None:
1068            writer.write_attribute('href', href)
1069        if obj.id is not None:
1070            writer.write_attribute('id', obj.id)
1071        if obj.comment is not None:
1072            Writer.write_string(writer, 'comment', obj.comment)
1073        if obj.description is not None:
1074            Writer.write_string(writer, 'description', obj.description)
1075        if obj.file is not None:
1076            FileWriter.write_one(obj.file, writer, 'file')
1077        if obj.name is not None:
1078            Writer.write_string(writer, 'name', obj.name)
1079        if obj.instance_type is not None:
1080            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
1081        if obj.template is not None:
1082            TemplateWriter.write_one(obj.template, writer, 'template')
1083        if obj.vm is not None:
1084            VmWriter.write_one(obj.vm, writer, 'vm')
1085        if obj.vms is not None:
1086            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
1087        writer.write_end()
1088
1089    @staticmethod
1090    def write_many(objs, writer, singular=None, plural=None):
1091        if singular is None:
1092            singular = 'cdrom'
1093        if plural is None:
1094            plural = 'cdroms'
1095        writer.write_start(plural)
1096        if type(objs) == List:
1097            href = objs.href
1098            if href is not None:
1099                writer.write_attribute('href', href)
1100        for obj in objs:
1101            CdromWriter.write_one(obj, writer, singular)
1102        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

CdromWriter()
1058    def __init__(self):
1059        super(CdromWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1061    @staticmethod
1062    def write_one(obj, writer, singular=None):
1063        if singular is None:
1064            singular = 'cdrom'
1065        writer.write_start(singular)
1066        href = obj.href
1067        if href is not None:
1068            writer.write_attribute('href', href)
1069        if obj.id is not None:
1070            writer.write_attribute('id', obj.id)
1071        if obj.comment is not None:
1072            Writer.write_string(writer, 'comment', obj.comment)
1073        if obj.description is not None:
1074            Writer.write_string(writer, 'description', obj.description)
1075        if obj.file is not None:
1076            FileWriter.write_one(obj.file, writer, 'file')
1077        if obj.name is not None:
1078            Writer.write_string(writer, 'name', obj.name)
1079        if obj.instance_type is not None:
1080            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
1081        if obj.template is not None:
1082            TemplateWriter.write_one(obj.template, writer, 'template')
1083        if obj.vm is not None:
1084            VmWriter.write_one(obj.vm, writer, 'vm')
1085        if obj.vms is not None:
1086            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
1087        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1089    @staticmethod
1090    def write_many(objs, writer, singular=None, plural=None):
1091        if singular is None:
1092            singular = 'cdrom'
1093        if plural is None:
1094            plural = 'cdroms'
1095        writer.write_start(plural)
1096        if type(objs) == List:
1097            href = objs.href
1098            if href is not None:
1099                writer.write_attribute('href', href)
1100        for obj in objs:
1101            CdromWriter.write_one(obj, writer, singular)
1102        writer.write_end()
class CertificateWriter(ovirtsdk4.writer.Writer):
1105class CertificateWriter(Writer):
1106
1107    def __init__(self):
1108        super(CertificateWriter, self).__init__()
1109
1110    @staticmethod
1111    def write_one(obj, writer, singular=None):
1112        if singular is None:
1113            singular = 'certificate'
1114        writer.write_start(singular)
1115        href = obj.href
1116        if href is not None:
1117            writer.write_attribute('href', href)
1118        if obj.id is not None:
1119            writer.write_attribute('id', obj.id)
1120        if obj.comment is not None:
1121            Writer.write_string(writer, 'comment', obj.comment)
1122        if obj.content is not None:
1123            Writer.write_string(writer, 'content', obj.content)
1124        if obj.description is not None:
1125            Writer.write_string(writer, 'description', obj.description)
1126        if obj.name is not None:
1127            Writer.write_string(writer, 'name', obj.name)
1128        if obj.organization is not None:
1129            Writer.write_string(writer, 'organization', obj.organization)
1130        if obj.subject is not None:
1131            Writer.write_string(writer, 'subject', obj.subject)
1132        writer.write_end()
1133
1134    @staticmethod
1135    def write_many(objs, writer, singular=None, plural=None):
1136        if singular is None:
1137            singular = 'certificate'
1138        if plural is None:
1139            plural = 'certificates'
1140        writer.write_start(plural)
1141        if type(objs) == List:
1142            href = objs.href
1143            if href is not None:
1144                writer.write_attribute('href', href)
1145        for obj in objs:
1146            CertificateWriter.write_one(obj, writer, singular)
1147        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

CertificateWriter()
1107    def __init__(self):
1108        super(CertificateWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1110    @staticmethod
1111    def write_one(obj, writer, singular=None):
1112        if singular is None:
1113            singular = 'certificate'
1114        writer.write_start(singular)
1115        href = obj.href
1116        if href is not None:
1117            writer.write_attribute('href', href)
1118        if obj.id is not None:
1119            writer.write_attribute('id', obj.id)
1120        if obj.comment is not None:
1121            Writer.write_string(writer, 'comment', obj.comment)
1122        if obj.content is not None:
1123            Writer.write_string(writer, 'content', obj.content)
1124        if obj.description is not None:
1125            Writer.write_string(writer, 'description', obj.description)
1126        if obj.name is not None:
1127            Writer.write_string(writer, 'name', obj.name)
1128        if obj.organization is not None:
1129            Writer.write_string(writer, 'organization', obj.organization)
1130        if obj.subject is not None:
1131            Writer.write_string(writer, 'subject', obj.subject)
1132        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1134    @staticmethod
1135    def write_many(objs, writer, singular=None, plural=None):
1136        if singular is None:
1137            singular = 'certificate'
1138        if plural is None:
1139            plural = 'certificates'
1140        writer.write_start(plural)
1141        if type(objs) == List:
1142            href = objs.href
1143            if href is not None:
1144                writer.write_attribute('href', href)
1145        for obj in objs:
1146            CertificateWriter.write_one(obj, writer, singular)
1147        writer.write_end()
class CheckpointWriter(ovirtsdk4.writer.Writer):
1150class CheckpointWriter(Writer):
1151
1152    def __init__(self):
1153        super(CheckpointWriter, self).__init__()
1154
1155    @staticmethod
1156    def write_one(obj, writer, singular=None):
1157        if singular is None:
1158            singular = 'checkpoint'
1159        writer.write_start(singular)
1160        href = obj.href
1161        if href is not None:
1162            writer.write_attribute('href', href)
1163        if obj.id is not None:
1164            writer.write_attribute('id', obj.id)
1165        if obj.comment is not None:
1166            Writer.write_string(writer, 'comment', obj.comment)
1167        if obj.creation_date is not None:
1168            Writer.write_date(writer, 'creation_date', obj.creation_date)
1169        if obj.description is not None:
1170            Writer.write_string(writer, 'description', obj.description)
1171        if obj.name is not None:
1172            Writer.write_string(writer, 'name', obj.name)
1173        if obj.parent_id is not None:
1174            Writer.write_string(writer, 'parent_id', obj.parent_id)
1175        if obj.state is not None:
1176            Writer.write_string(writer, 'state', obj.state.value)
1177        if obj.disks is not None:
1178            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
1179        if obj.vm is not None:
1180            VmWriter.write_one(obj.vm, writer, 'vm')
1181        writer.write_end()
1182
1183    @staticmethod
1184    def write_many(objs, writer, singular=None, plural=None):
1185        if singular is None:
1186            singular = 'checkpoint'
1187        if plural is None:
1188            plural = 'checkpoints'
1189        writer.write_start(plural)
1190        if type(objs) == List:
1191            href = objs.href
1192            if href is not None:
1193                writer.write_attribute('href', href)
1194        for obj in objs:
1195            CheckpointWriter.write_one(obj, writer, singular)
1196        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

CheckpointWriter()
1152    def __init__(self):
1153        super(CheckpointWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1155    @staticmethod
1156    def write_one(obj, writer, singular=None):
1157        if singular is None:
1158            singular = 'checkpoint'
1159        writer.write_start(singular)
1160        href = obj.href
1161        if href is not None:
1162            writer.write_attribute('href', href)
1163        if obj.id is not None:
1164            writer.write_attribute('id', obj.id)
1165        if obj.comment is not None:
1166            Writer.write_string(writer, 'comment', obj.comment)
1167        if obj.creation_date is not None:
1168            Writer.write_date(writer, 'creation_date', obj.creation_date)
1169        if obj.description is not None:
1170            Writer.write_string(writer, 'description', obj.description)
1171        if obj.name is not None:
1172            Writer.write_string(writer, 'name', obj.name)
1173        if obj.parent_id is not None:
1174            Writer.write_string(writer, 'parent_id', obj.parent_id)
1175        if obj.state is not None:
1176            Writer.write_string(writer, 'state', obj.state.value)
1177        if obj.disks is not None:
1178            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
1179        if obj.vm is not None:
1180            VmWriter.write_one(obj.vm, writer, 'vm')
1181        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1183    @staticmethod
1184    def write_many(objs, writer, singular=None, plural=None):
1185        if singular is None:
1186            singular = 'checkpoint'
1187        if plural is None:
1188            plural = 'checkpoints'
1189        writer.write_start(plural)
1190        if type(objs) == List:
1191            href = objs.href
1192            if href is not None:
1193                writer.write_attribute('href', href)
1194        for obj in objs:
1195            CheckpointWriter.write_one(obj, writer, singular)
1196        writer.write_end()
class CloudInitWriter(ovirtsdk4.writer.Writer):
1199class CloudInitWriter(Writer):
1200
1201    def __init__(self):
1202        super(CloudInitWriter, self).__init__()
1203
1204    @staticmethod
1205    def write_one(obj, writer, singular=None):
1206        if singular is None:
1207            singular = 'cloud_init'
1208        writer.write_start(singular)
1209        href = obj.href
1210        if href is not None:
1211            writer.write_attribute('href', href)
1212        if obj.authorized_keys is not None:
1213            AuthorizedKeyWriter.write_many(obj.authorized_keys, writer, 'authorized_key', 'authorized_keys')
1214        if obj.files is not None:
1215            FileWriter.write_many(obj.files, writer, 'file', 'files')
1216        if obj.host is not None:
1217            HostWriter.write_one(obj.host, writer, 'host')
1218        if obj.network_configuration is not None:
1219            NetworkConfigurationWriter.write_one(obj.network_configuration, writer, 'network_configuration')
1220        if obj.regenerate_ssh_keys is not None:
1221            Writer.write_boolean(writer, 'regenerate_ssh_keys', obj.regenerate_ssh_keys)
1222        if obj.timezone is not None:
1223            Writer.write_string(writer, 'timezone', obj.timezone)
1224        if obj.users is not None:
1225            UserWriter.write_many(obj.users, writer, 'user', 'users')
1226        writer.write_end()
1227
1228    @staticmethod
1229    def write_many(objs, writer, singular=None, plural=None):
1230        if singular is None:
1231            singular = 'cloud_init'
1232        if plural is None:
1233            plural = 'cloud_inits'
1234        writer.write_start(plural)
1235        if type(objs) == List:
1236            href = objs.href
1237            if href is not None:
1238                writer.write_attribute('href', href)
1239        for obj in objs:
1240            CloudInitWriter.write_one(obj, writer, singular)
1241        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

CloudInitWriter()
1201    def __init__(self):
1202        super(CloudInitWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1204    @staticmethod
1205    def write_one(obj, writer, singular=None):
1206        if singular is None:
1207            singular = 'cloud_init'
1208        writer.write_start(singular)
1209        href = obj.href
1210        if href is not None:
1211            writer.write_attribute('href', href)
1212        if obj.authorized_keys is not None:
1213            AuthorizedKeyWriter.write_many(obj.authorized_keys, writer, 'authorized_key', 'authorized_keys')
1214        if obj.files is not None:
1215            FileWriter.write_many(obj.files, writer, 'file', 'files')
1216        if obj.host is not None:
1217            HostWriter.write_one(obj.host, writer, 'host')
1218        if obj.network_configuration is not None:
1219            NetworkConfigurationWriter.write_one(obj.network_configuration, writer, 'network_configuration')
1220        if obj.regenerate_ssh_keys is not None:
1221            Writer.write_boolean(writer, 'regenerate_ssh_keys', obj.regenerate_ssh_keys)
1222        if obj.timezone is not None:
1223            Writer.write_string(writer, 'timezone', obj.timezone)
1224        if obj.users is not None:
1225            UserWriter.write_many(obj.users, writer, 'user', 'users')
1226        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1228    @staticmethod
1229    def write_many(objs, writer, singular=None, plural=None):
1230        if singular is None:
1231            singular = 'cloud_init'
1232        if plural is None:
1233            plural = 'cloud_inits'
1234        writer.write_start(plural)
1235        if type(objs) == List:
1236            href = objs.href
1237            if href is not None:
1238                writer.write_attribute('href', href)
1239        for obj in objs:
1240            CloudInitWriter.write_one(obj, writer, singular)
1241        writer.write_end()
class ClusterWriter(ovirtsdk4.writer.Writer):
1244class ClusterWriter(Writer):
1245
1246    def __init__(self):
1247        super(ClusterWriter, self).__init__()
1248
1249    @staticmethod
1250    def write_one(obj, writer, singular=None):
1251        if singular is None:
1252            singular = 'cluster'
1253        writer.write_start(singular)
1254        href = obj.href
1255        if href is not None:
1256            writer.write_attribute('href', href)
1257        if obj.id is not None:
1258            writer.write_attribute('id', obj.id)
1259        if obj.ballooning_enabled is not None:
1260            Writer.write_boolean(writer, 'ballooning_enabled', obj.ballooning_enabled)
1261        if obj.bios_type is not None:
1262            Writer.write_string(writer, 'bios_type', obj.bios_type.value)
1263        if obj.comment is not None:
1264            Writer.write_string(writer, 'comment', obj.comment)
1265        if obj.cpu is not None:
1266            CpuWriter.write_one(obj.cpu, writer, 'cpu')
1267        if obj.custom_scheduling_policy_properties is not None:
1268            PropertyWriter.write_many(obj.custom_scheduling_policy_properties, writer, 'property', 'custom_scheduling_policy_properties')
1269        if obj.description is not None:
1270            Writer.write_string(writer, 'description', obj.description)
1271        if obj.display is not None:
1272            DisplayWriter.write_one(obj.display, writer, 'display')
1273        if obj.error_handling is not None:
1274            ErrorHandlingWriter.write_one(obj.error_handling, writer, 'error_handling')
1275        if obj.fencing_policy is not None:
1276            FencingPolicyWriter.write_one(obj.fencing_policy, writer, 'fencing_policy')
1277        if obj.fips_mode is not None:
1278            Writer.write_string(writer, 'fips_mode', obj.fips_mode.value)
1279        if obj.firewall_type is not None:
1280            Writer.write_string(writer, 'firewall_type', obj.firewall_type.value)
1281        if obj.gluster_service is not None:
1282            Writer.write_boolean(writer, 'gluster_service', obj.gluster_service)
1283        if obj.gluster_tuned_profile is not None:
1284            Writer.write_string(writer, 'gluster_tuned_profile', obj.gluster_tuned_profile)
1285        if obj.ha_reservation is not None:
1286            Writer.write_boolean(writer, 'ha_reservation', obj.ha_reservation)
1287        if obj.ksm is not None:
1288            KsmWriter.write_one(obj.ksm, writer, 'ksm')
1289        if obj.log_max_memory_used_threshold is not None:
1290            Writer.write_integer(writer, 'log_max_memory_used_threshold', obj.log_max_memory_used_threshold)
1291        if obj.log_max_memory_used_threshold_type is not None:
1292            Writer.write_string(writer, 'log_max_memory_used_threshold_type', obj.log_max_memory_used_threshold_type.value)
1293        if obj.maintenance_reason_required is not None:
1294            Writer.write_boolean(writer, 'maintenance_reason_required', obj.maintenance_reason_required)
1295        if obj.memory_policy is not None:
1296            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
1297        if obj.migration is not None:
1298            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
1299        if obj.name is not None:
1300            Writer.write_string(writer, 'name', obj.name)
1301        if obj.optional_reason is not None:
1302            Writer.write_boolean(writer, 'optional_reason', obj.optional_reason)
1303        if obj.required_rng_sources is not None:
1304            writer.write_start('required_rng_sources')
1305            for item in obj.required_rng_sources:
1306                if item is not None:
1307                    Writer.write_string(writer, 'required_rng_source', item.value)
1308            writer.write_end()
1309        if obj.serial_number is not None:
1310            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
1311        if obj.supported_versions is not None:
1312            VersionWriter.write_many(obj.supported_versions, writer, 'version', 'supported_versions')
1313        if obj.switch_type is not None:
1314            Writer.write_string(writer, 'switch_type', obj.switch_type.value)
1315        if obj.threads_as_cores is not None:
1316            Writer.write_boolean(writer, 'threads_as_cores', obj.threads_as_cores)
1317        if obj.trusted_service is not None:
1318            Writer.write_boolean(writer, 'trusted_service', obj.trusted_service)
1319        if obj.tunnel_migration is not None:
1320            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
1321        if obj.upgrade_correlation_id is not None:
1322            Writer.write_string(writer, 'upgrade_correlation_id', obj.upgrade_correlation_id)
1323        if obj.upgrade_in_progress is not None:
1324            Writer.write_boolean(writer, 'upgrade_in_progress', obj.upgrade_in_progress)
1325        if obj.upgrade_percent_complete is not None:
1326            Writer.write_integer(writer, 'upgrade_percent_complete', obj.upgrade_percent_complete)
1327        if obj.version is not None:
1328            VersionWriter.write_one(obj.version, writer, 'version')
1329        if obj.virt_service is not None:
1330            Writer.write_boolean(writer, 'virt_service', obj.virt_service)
1331        if obj.vnc_encryption is not None:
1332            Writer.write_boolean(writer, 'vnc_encryption', obj.vnc_encryption)
1333        if obj.affinity_groups is not None:
1334            AffinityGroupWriter.write_many(obj.affinity_groups, writer, 'affinity_group', 'affinity_groups')
1335        if obj.cpu_profiles is not None:
1336            CpuProfileWriter.write_many(obj.cpu_profiles, writer, 'cpu_profile', 'cpu_profiles')
1337        if obj.data_center is not None:
1338            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
1339        if obj.enabled_features is not None:
1340            ClusterFeatureWriter.write_many(obj.enabled_features, writer, 'cluster_feature', 'enabled_features')
1341        if obj.external_network_providers is not None:
1342            ExternalProviderWriter.write_many(obj.external_network_providers, writer, 'external_provider', 'external_network_providers')
1343        if obj.gluster_hooks is not None:
1344            GlusterHookWriter.write_many(obj.gluster_hooks, writer, 'gluster_hook', 'gluster_hooks')
1345        if obj.gluster_volumes is not None:
1346            GlusterVolumeWriter.write_many(obj.gluster_volumes, writer, 'gluster_volume', 'gluster_volumes')
1347        if obj.mac_pool is not None:
1348            MacPoolWriter.write_one(obj.mac_pool, writer, 'mac_pool')
1349        if obj.management_network is not None:
1350            NetworkWriter.write_one(obj.management_network, writer, 'management_network')
1351        if obj.network_filters is not None:
1352            NetworkFilterWriter.write_many(obj.network_filters, writer, 'network_filter', 'network_filters')
1353        if obj.networks is not None:
1354            NetworkWriter.write_many(obj.networks, writer, 'network', 'networks')
1355        if obj.permissions is not None:
1356            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
1357        if obj.scheduling_policy is not None:
1358            SchedulingPolicyWriter.write_one(obj.scheduling_policy, writer, 'scheduling_policy')
1359        writer.write_end()
1360
1361    @staticmethod
1362    def write_many(objs, writer, singular=None, plural=None):
1363        if singular is None:
1364            singular = 'cluster'
1365        if plural is None:
1366            plural = 'clusters'
1367        writer.write_start(plural)
1368        if type(objs) == List:
1369            href = objs.href
1370            if href is not None:
1371                writer.write_attribute('href', href)
1372        for obj in objs:
1373            ClusterWriter.write_one(obj, writer, singular)
1374        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ClusterWriter()
1246    def __init__(self):
1247        super(ClusterWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1249    @staticmethod
1250    def write_one(obj, writer, singular=None):
1251        if singular is None:
1252            singular = 'cluster'
1253        writer.write_start(singular)
1254        href = obj.href
1255        if href is not None:
1256            writer.write_attribute('href', href)
1257        if obj.id is not None:
1258            writer.write_attribute('id', obj.id)
1259        if obj.ballooning_enabled is not None:
1260            Writer.write_boolean(writer, 'ballooning_enabled', obj.ballooning_enabled)
1261        if obj.bios_type is not None:
1262            Writer.write_string(writer, 'bios_type', obj.bios_type.value)
1263        if obj.comment is not None:
1264            Writer.write_string(writer, 'comment', obj.comment)
1265        if obj.cpu is not None:
1266            CpuWriter.write_one(obj.cpu, writer, 'cpu')
1267        if obj.custom_scheduling_policy_properties is not None:
1268            PropertyWriter.write_many(obj.custom_scheduling_policy_properties, writer, 'property', 'custom_scheduling_policy_properties')
1269        if obj.description is not None:
1270            Writer.write_string(writer, 'description', obj.description)
1271        if obj.display is not None:
1272            DisplayWriter.write_one(obj.display, writer, 'display')
1273        if obj.error_handling is not None:
1274            ErrorHandlingWriter.write_one(obj.error_handling, writer, 'error_handling')
1275        if obj.fencing_policy is not None:
1276            FencingPolicyWriter.write_one(obj.fencing_policy, writer, 'fencing_policy')
1277        if obj.fips_mode is not None:
1278            Writer.write_string(writer, 'fips_mode', obj.fips_mode.value)
1279        if obj.firewall_type is not None:
1280            Writer.write_string(writer, 'firewall_type', obj.firewall_type.value)
1281        if obj.gluster_service is not None:
1282            Writer.write_boolean(writer, 'gluster_service', obj.gluster_service)
1283        if obj.gluster_tuned_profile is not None:
1284            Writer.write_string(writer, 'gluster_tuned_profile', obj.gluster_tuned_profile)
1285        if obj.ha_reservation is not None:
1286            Writer.write_boolean(writer, 'ha_reservation', obj.ha_reservation)
1287        if obj.ksm is not None:
1288            KsmWriter.write_one(obj.ksm, writer, 'ksm')
1289        if obj.log_max_memory_used_threshold is not None:
1290            Writer.write_integer(writer, 'log_max_memory_used_threshold', obj.log_max_memory_used_threshold)
1291        if obj.log_max_memory_used_threshold_type is not None:
1292            Writer.write_string(writer, 'log_max_memory_used_threshold_type', obj.log_max_memory_used_threshold_type.value)
1293        if obj.maintenance_reason_required is not None:
1294            Writer.write_boolean(writer, 'maintenance_reason_required', obj.maintenance_reason_required)
1295        if obj.memory_policy is not None:
1296            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
1297        if obj.migration is not None:
1298            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
1299        if obj.name is not None:
1300            Writer.write_string(writer, 'name', obj.name)
1301        if obj.optional_reason is not None:
1302            Writer.write_boolean(writer, 'optional_reason', obj.optional_reason)
1303        if obj.required_rng_sources is not None:
1304            writer.write_start('required_rng_sources')
1305            for item in obj.required_rng_sources:
1306                if item is not None:
1307                    Writer.write_string(writer, 'required_rng_source', item.value)
1308            writer.write_end()
1309        if obj.serial_number is not None:
1310            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
1311        if obj.supported_versions is not None:
1312            VersionWriter.write_many(obj.supported_versions, writer, 'version', 'supported_versions')
1313        if obj.switch_type is not None:
1314            Writer.write_string(writer, 'switch_type', obj.switch_type.value)
1315        if obj.threads_as_cores is not None:
1316            Writer.write_boolean(writer, 'threads_as_cores', obj.threads_as_cores)
1317        if obj.trusted_service is not None:
1318            Writer.write_boolean(writer, 'trusted_service', obj.trusted_service)
1319        if obj.tunnel_migration is not None:
1320            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
1321        if obj.upgrade_correlation_id is not None:
1322            Writer.write_string(writer, 'upgrade_correlation_id', obj.upgrade_correlation_id)
1323        if obj.upgrade_in_progress is not None:
1324            Writer.write_boolean(writer, 'upgrade_in_progress', obj.upgrade_in_progress)
1325        if obj.upgrade_percent_complete is not None:
1326            Writer.write_integer(writer, 'upgrade_percent_complete', obj.upgrade_percent_complete)
1327        if obj.version is not None:
1328            VersionWriter.write_one(obj.version, writer, 'version')
1329        if obj.virt_service is not None:
1330            Writer.write_boolean(writer, 'virt_service', obj.virt_service)
1331        if obj.vnc_encryption is not None:
1332            Writer.write_boolean(writer, 'vnc_encryption', obj.vnc_encryption)
1333        if obj.affinity_groups is not None:
1334            AffinityGroupWriter.write_many(obj.affinity_groups, writer, 'affinity_group', 'affinity_groups')
1335        if obj.cpu_profiles is not None:
1336            CpuProfileWriter.write_many(obj.cpu_profiles, writer, 'cpu_profile', 'cpu_profiles')
1337        if obj.data_center is not None:
1338            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
1339        if obj.enabled_features is not None:
1340            ClusterFeatureWriter.write_many(obj.enabled_features, writer, 'cluster_feature', 'enabled_features')
1341        if obj.external_network_providers is not None:
1342            ExternalProviderWriter.write_many(obj.external_network_providers, writer, 'external_provider', 'external_network_providers')
1343        if obj.gluster_hooks is not None:
1344            GlusterHookWriter.write_many(obj.gluster_hooks, writer, 'gluster_hook', 'gluster_hooks')
1345        if obj.gluster_volumes is not None:
1346            GlusterVolumeWriter.write_many(obj.gluster_volumes, writer, 'gluster_volume', 'gluster_volumes')
1347        if obj.mac_pool is not None:
1348            MacPoolWriter.write_one(obj.mac_pool, writer, 'mac_pool')
1349        if obj.management_network is not None:
1350            NetworkWriter.write_one(obj.management_network, writer, 'management_network')
1351        if obj.network_filters is not None:
1352            NetworkFilterWriter.write_many(obj.network_filters, writer, 'network_filter', 'network_filters')
1353        if obj.networks is not None:
1354            NetworkWriter.write_many(obj.networks, writer, 'network', 'networks')
1355        if obj.permissions is not None:
1356            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
1357        if obj.scheduling_policy is not None:
1358            SchedulingPolicyWriter.write_one(obj.scheduling_policy, writer, 'scheduling_policy')
1359        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1361    @staticmethod
1362    def write_many(objs, writer, singular=None, plural=None):
1363        if singular is None:
1364            singular = 'cluster'
1365        if plural is None:
1366            plural = 'clusters'
1367        writer.write_start(plural)
1368        if type(objs) == List:
1369            href = objs.href
1370            if href is not None:
1371                writer.write_attribute('href', href)
1372        for obj in objs:
1373            ClusterWriter.write_one(obj, writer, singular)
1374        writer.write_end()
class ClusterFeatureWriter(ovirtsdk4.writer.Writer):
1377class ClusterFeatureWriter(Writer):
1378
1379    def __init__(self):
1380        super(ClusterFeatureWriter, self).__init__()
1381
1382    @staticmethod
1383    def write_one(obj, writer, singular=None):
1384        if singular is None:
1385            singular = 'cluster_feature'
1386        writer.write_start(singular)
1387        href = obj.href
1388        if href is not None:
1389            writer.write_attribute('href', href)
1390        if obj.id is not None:
1391            writer.write_attribute('id', obj.id)
1392        if obj.comment is not None:
1393            Writer.write_string(writer, 'comment', obj.comment)
1394        if obj.description is not None:
1395            Writer.write_string(writer, 'description', obj.description)
1396        if obj.name is not None:
1397            Writer.write_string(writer, 'name', obj.name)
1398        if obj.cluster_level is not None:
1399            ClusterLevelWriter.write_one(obj.cluster_level, writer, 'cluster_level')
1400        writer.write_end()
1401
1402    @staticmethod
1403    def write_many(objs, writer, singular=None, plural=None):
1404        if singular is None:
1405            singular = 'cluster_feature'
1406        if plural is None:
1407            plural = 'cluster_features'
1408        writer.write_start(plural)
1409        if type(objs) == List:
1410            href = objs.href
1411            if href is not None:
1412                writer.write_attribute('href', href)
1413        for obj in objs:
1414            ClusterFeatureWriter.write_one(obj, writer, singular)
1415        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ClusterFeatureWriter()
1379    def __init__(self):
1380        super(ClusterFeatureWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1382    @staticmethod
1383    def write_one(obj, writer, singular=None):
1384        if singular is None:
1385            singular = 'cluster_feature'
1386        writer.write_start(singular)
1387        href = obj.href
1388        if href is not None:
1389            writer.write_attribute('href', href)
1390        if obj.id is not None:
1391            writer.write_attribute('id', obj.id)
1392        if obj.comment is not None:
1393            Writer.write_string(writer, 'comment', obj.comment)
1394        if obj.description is not None:
1395            Writer.write_string(writer, 'description', obj.description)
1396        if obj.name is not None:
1397            Writer.write_string(writer, 'name', obj.name)
1398        if obj.cluster_level is not None:
1399            ClusterLevelWriter.write_one(obj.cluster_level, writer, 'cluster_level')
1400        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1402    @staticmethod
1403    def write_many(objs, writer, singular=None, plural=None):
1404        if singular is None:
1405            singular = 'cluster_feature'
1406        if plural is None:
1407            plural = 'cluster_features'
1408        writer.write_start(plural)
1409        if type(objs) == List:
1410            href = objs.href
1411            if href is not None:
1412                writer.write_attribute('href', href)
1413        for obj in objs:
1414            ClusterFeatureWriter.write_one(obj, writer, singular)
1415        writer.write_end()
class ClusterLevelWriter(ovirtsdk4.writer.Writer):
1418class ClusterLevelWriter(Writer):
1419
1420    def __init__(self):
1421        super(ClusterLevelWriter, self).__init__()
1422
1423    @staticmethod
1424    def write_one(obj, writer, singular=None):
1425        if singular is None:
1426            singular = 'cluster_level'
1427        writer.write_start(singular)
1428        href = obj.href
1429        if href is not None:
1430            writer.write_attribute('href', href)
1431        if obj.id is not None:
1432            writer.write_attribute('id', obj.id)
1433        if obj.comment is not None:
1434            Writer.write_string(writer, 'comment', obj.comment)
1435        if obj.cpu_types is not None:
1436            CpuTypeWriter.write_many(obj.cpu_types, writer, 'cpu_type', 'cpu_types')
1437        if obj.description is not None:
1438            Writer.write_string(writer, 'description', obj.description)
1439        if obj.name is not None:
1440            Writer.write_string(writer, 'name', obj.name)
1441        if obj.permits is not None:
1442            PermitWriter.write_many(obj.permits, writer, 'permit', 'permits')
1443        if obj.cluster_features is not None:
1444            ClusterFeatureWriter.write_many(obj.cluster_features, writer, 'cluster_feature', 'cluster_features')
1445        writer.write_end()
1446
1447    @staticmethod
1448    def write_many(objs, writer, singular=None, plural=None):
1449        if singular is None:
1450            singular = 'cluster_level'
1451        if plural is None:
1452            plural = 'cluster_levels'
1453        writer.write_start(plural)
1454        if type(objs) == List:
1455            href = objs.href
1456            if href is not None:
1457                writer.write_attribute('href', href)
1458        for obj in objs:
1459            ClusterLevelWriter.write_one(obj, writer, singular)
1460        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ClusterLevelWriter()
1420    def __init__(self):
1421        super(ClusterLevelWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1423    @staticmethod
1424    def write_one(obj, writer, singular=None):
1425        if singular is None:
1426            singular = 'cluster_level'
1427        writer.write_start(singular)
1428        href = obj.href
1429        if href is not None:
1430            writer.write_attribute('href', href)
1431        if obj.id is not None:
1432            writer.write_attribute('id', obj.id)
1433        if obj.comment is not None:
1434            Writer.write_string(writer, 'comment', obj.comment)
1435        if obj.cpu_types is not None:
1436            CpuTypeWriter.write_many(obj.cpu_types, writer, 'cpu_type', 'cpu_types')
1437        if obj.description is not None:
1438            Writer.write_string(writer, 'description', obj.description)
1439        if obj.name is not None:
1440            Writer.write_string(writer, 'name', obj.name)
1441        if obj.permits is not None:
1442            PermitWriter.write_many(obj.permits, writer, 'permit', 'permits')
1443        if obj.cluster_features is not None:
1444            ClusterFeatureWriter.write_many(obj.cluster_features, writer, 'cluster_feature', 'cluster_features')
1445        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1447    @staticmethod
1448    def write_many(objs, writer, singular=None, plural=None):
1449        if singular is None:
1450            singular = 'cluster_level'
1451        if plural is None:
1452            plural = 'cluster_levels'
1453        writer.write_start(plural)
1454        if type(objs) == List:
1455            href = objs.href
1456            if href is not None:
1457                writer.write_attribute('href', href)
1458        for obj in objs:
1459            ClusterLevelWriter.write_one(obj, writer, singular)
1460        writer.write_end()
class ConfigurationWriter(ovirtsdk4.writer.Writer):
1463class ConfigurationWriter(Writer):
1464
1465    def __init__(self):
1466        super(ConfigurationWriter, self).__init__()
1467
1468    @staticmethod
1469    def write_one(obj, writer, singular=None):
1470        if singular is None:
1471            singular = 'configuration'
1472        writer.write_start(singular)
1473        href = obj.href
1474        if href is not None:
1475            writer.write_attribute('href', href)
1476        if obj.data is not None:
1477            Writer.write_string(writer, 'data', obj.data)
1478        if obj.type is not None:
1479            Writer.write_string(writer, 'type', obj.type.value)
1480        writer.write_end()
1481
1482    @staticmethod
1483    def write_many(objs, writer, singular=None, plural=None):
1484        if singular is None:
1485            singular = 'configuration'
1486        if plural is None:
1487            plural = 'configurations'
1488        writer.write_start(plural)
1489        if type(objs) == List:
1490            href = objs.href
1491            if href is not None:
1492                writer.write_attribute('href', href)
1493        for obj in objs:
1494            ConfigurationWriter.write_one(obj, writer, singular)
1495        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ConfigurationWriter()
1465    def __init__(self):
1466        super(ConfigurationWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1468    @staticmethod
1469    def write_one(obj, writer, singular=None):
1470        if singular is None:
1471            singular = 'configuration'
1472        writer.write_start(singular)
1473        href = obj.href
1474        if href is not None:
1475            writer.write_attribute('href', href)
1476        if obj.data is not None:
1477            Writer.write_string(writer, 'data', obj.data)
1478        if obj.type is not None:
1479            Writer.write_string(writer, 'type', obj.type.value)
1480        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1482    @staticmethod
1483    def write_many(objs, writer, singular=None, plural=None):
1484        if singular is None:
1485            singular = 'configuration'
1486        if plural is None:
1487            plural = 'configurations'
1488        writer.write_start(plural)
1489        if type(objs) == List:
1490            href = objs.href
1491            if href is not None:
1492                writer.write_attribute('href', href)
1493        for obj in objs:
1494            ConfigurationWriter.write_one(obj, writer, singular)
1495        writer.write_end()
class ConsoleWriter(ovirtsdk4.writer.Writer):
1498class ConsoleWriter(Writer):
1499
1500    def __init__(self):
1501        super(ConsoleWriter, self).__init__()
1502
1503    @staticmethod
1504    def write_one(obj, writer, singular=None):
1505        if singular is None:
1506            singular = 'console'
1507        writer.write_start(singular)
1508        href = obj.href
1509        if href is not None:
1510            writer.write_attribute('href', href)
1511        if obj.enabled is not None:
1512            Writer.write_boolean(writer, 'enabled', obj.enabled)
1513        writer.write_end()
1514
1515    @staticmethod
1516    def write_many(objs, writer, singular=None, plural=None):
1517        if singular is None:
1518            singular = 'console'
1519        if plural is None:
1520            plural = 'consoles'
1521        writer.write_start(plural)
1522        if type(objs) == List:
1523            href = objs.href
1524            if href is not None:
1525                writer.write_attribute('href', href)
1526        for obj in objs:
1527            ConsoleWriter.write_one(obj, writer, singular)
1528        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ConsoleWriter()
1500    def __init__(self):
1501        super(ConsoleWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1503    @staticmethod
1504    def write_one(obj, writer, singular=None):
1505        if singular is None:
1506            singular = 'console'
1507        writer.write_start(singular)
1508        href = obj.href
1509        if href is not None:
1510            writer.write_attribute('href', href)
1511        if obj.enabled is not None:
1512            Writer.write_boolean(writer, 'enabled', obj.enabled)
1513        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1515    @staticmethod
1516    def write_many(objs, writer, singular=None, plural=None):
1517        if singular is None:
1518            singular = 'console'
1519        if plural is None:
1520            plural = 'consoles'
1521        writer.write_start(plural)
1522        if type(objs) == List:
1523            href = objs.href
1524            if href is not None:
1525                writer.write_attribute('href', href)
1526        for obj in objs:
1527            ConsoleWriter.write_one(obj, writer, singular)
1528        writer.write_end()
class CoreWriter(ovirtsdk4.writer.Writer):
1531class CoreWriter(Writer):
1532
1533    def __init__(self):
1534        super(CoreWriter, self).__init__()
1535
1536    @staticmethod
1537    def write_one(obj, writer, singular=None):
1538        if singular is None:
1539            singular = 'core'
1540        writer.write_start(singular)
1541        href = obj.href
1542        if href is not None:
1543            writer.write_attribute('href', href)
1544        if obj.index is not None:
1545            Writer.write_integer(writer, 'index', obj.index)
1546        if obj.socket is not None:
1547            Writer.write_integer(writer, 'socket', obj.socket)
1548        writer.write_end()
1549
1550    @staticmethod
1551    def write_many(objs, writer, singular=None, plural=None):
1552        if singular is None:
1553            singular = 'core'
1554        if plural is None:
1555            plural = 'cores'
1556        writer.write_start(plural)
1557        if type(objs) == List:
1558            href = objs.href
1559            if href is not None:
1560                writer.write_attribute('href', href)
1561        for obj in objs:
1562            CoreWriter.write_one(obj, writer, singular)
1563        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

CoreWriter()
1533    def __init__(self):
1534        super(CoreWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1536    @staticmethod
1537    def write_one(obj, writer, singular=None):
1538        if singular is None:
1539            singular = 'core'
1540        writer.write_start(singular)
1541        href = obj.href
1542        if href is not None:
1543            writer.write_attribute('href', href)
1544        if obj.index is not None:
1545            Writer.write_integer(writer, 'index', obj.index)
1546        if obj.socket is not None:
1547            Writer.write_integer(writer, 'socket', obj.socket)
1548        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1550    @staticmethod
1551    def write_many(objs, writer, singular=None, plural=None):
1552        if singular is None:
1553            singular = 'core'
1554        if plural is None:
1555            plural = 'cores'
1556        writer.write_start(plural)
1557        if type(objs) == List:
1558            href = objs.href
1559            if href is not None:
1560                writer.write_attribute('href', href)
1561        for obj in objs:
1562            CoreWriter.write_one(obj, writer, singular)
1563        writer.write_end()
class CpuWriter(ovirtsdk4.writer.Writer):
1566class CpuWriter(Writer):
1567
1568    def __init__(self):
1569        super(CpuWriter, self).__init__()
1570
1571    @staticmethod
1572    def write_one(obj, writer, singular=None):
1573        if singular is None:
1574            singular = 'cpu'
1575        writer.write_start(singular)
1576        href = obj.href
1577        if href is not None:
1578            writer.write_attribute('href', href)
1579        if obj.architecture is not None:
1580            Writer.write_string(writer, 'architecture', obj.architecture.value)
1581        if obj.cores is not None:
1582            CoreWriter.write_many(obj.cores, writer, 'core', 'cores')
1583        if obj.cpu_tune is not None:
1584            CpuTuneWriter.write_one(obj.cpu_tune, writer, 'cpu_tune')
1585        if obj.level is not None:
1586            Writer.write_integer(writer, 'level', obj.level)
1587        if obj.mode is not None:
1588            Writer.write_string(writer, 'mode', obj.mode.value)
1589        if obj.name is not None:
1590            Writer.write_string(writer, 'name', obj.name)
1591        if obj.speed is not None:
1592            Writer.write_decimal(writer, 'speed', obj.speed)
1593        if obj.topology is not None:
1594            CpuTopologyWriter.write_one(obj.topology, writer, 'topology')
1595        if obj.type is not None:
1596            Writer.write_string(writer, 'type', obj.type)
1597        writer.write_end()
1598
1599    @staticmethod
1600    def write_many(objs, writer, singular=None, plural=None):
1601        if singular is None:
1602            singular = 'cpu'
1603        if plural is None:
1604            plural = 'cpus'
1605        writer.write_start(plural)
1606        if type(objs) == List:
1607            href = objs.href
1608            if href is not None:
1609                writer.write_attribute('href', href)
1610        for obj in objs:
1611            CpuWriter.write_one(obj, writer, singular)
1612        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

CpuWriter()
1568    def __init__(self):
1569        super(CpuWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1571    @staticmethod
1572    def write_one(obj, writer, singular=None):
1573        if singular is None:
1574            singular = 'cpu'
1575        writer.write_start(singular)
1576        href = obj.href
1577        if href is not None:
1578            writer.write_attribute('href', href)
1579        if obj.architecture is not None:
1580            Writer.write_string(writer, 'architecture', obj.architecture.value)
1581        if obj.cores is not None:
1582            CoreWriter.write_many(obj.cores, writer, 'core', 'cores')
1583        if obj.cpu_tune is not None:
1584            CpuTuneWriter.write_one(obj.cpu_tune, writer, 'cpu_tune')
1585        if obj.level is not None:
1586            Writer.write_integer(writer, 'level', obj.level)
1587        if obj.mode is not None:
1588            Writer.write_string(writer, 'mode', obj.mode.value)
1589        if obj.name is not None:
1590            Writer.write_string(writer, 'name', obj.name)
1591        if obj.speed is not None:
1592            Writer.write_decimal(writer, 'speed', obj.speed)
1593        if obj.topology is not None:
1594            CpuTopologyWriter.write_one(obj.topology, writer, 'topology')
1595        if obj.type is not None:
1596            Writer.write_string(writer, 'type', obj.type)
1597        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1599    @staticmethod
1600    def write_many(objs, writer, singular=None, plural=None):
1601        if singular is None:
1602            singular = 'cpu'
1603        if plural is None:
1604            plural = 'cpus'
1605        writer.write_start(plural)
1606        if type(objs) == List:
1607            href = objs.href
1608            if href is not None:
1609                writer.write_attribute('href', href)
1610        for obj in objs:
1611            CpuWriter.write_one(obj, writer, singular)
1612        writer.write_end()
class CpuProfileWriter(ovirtsdk4.writer.Writer):
1615class CpuProfileWriter(Writer):
1616
1617    def __init__(self):
1618        super(CpuProfileWriter, self).__init__()
1619
1620    @staticmethod
1621    def write_one(obj, writer, singular=None):
1622        if singular is None:
1623            singular = 'cpu_profile'
1624        writer.write_start(singular)
1625        href = obj.href
1626        if href is not None:
1627            writer.write_attribute('href', href)
1628        if obj.id is not None:
1629            writer.write_attribute('id', obj.id)
1630        if obj.comment is not None:
1631            Writer.write_string(writer, 'comment', obj.comment)
1632        if obj.description is not None:
1633            Writer.write_string(writer, 'description', obj.description)
1634        if obj.name is not None:
1635            Writer.write_string(writer, 'name', obj.name)
1636        if obj.cluster is not None:
1637            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
1638        if obj.permissions is not None:
1639            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
1640        if obj.qos is not None:
1641            QosWriter.write_one(obj.qos, writer, 'qos')
1642        writer.write_end()
1643
1644    @staticmethod
1645    def write_many(objs, writer, singular=None, plural=None):
1646        if singular is None:
1647            singular = 'cpu_profile'
1648        if plural is None:
1649            plural = 'cpu_profiles'
1650        writer.write_start(plural)
1651        if type(objs) == List:
1652            href = objs.href
1653            if href is not None:
1654                writer.write_attribute('href', href)
1655        for obj in objs:
1656            CpuProfileWriter.write_one(obj, writer, singular)
1657        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

CpuProfileWriter()
1617    def __init__(self):
1618        super(CpuProfileWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1620    @staticmethod
1621    def write_one(obj, writer, singular=None):
1622        if singular is None:
1623            singular = 'cpu_profile'
1624        writer.write_start(singular)
1625        href = obj.href
1626        if href is not None:
1627            writer.write_attribute('href', href)
1628        if obj.id is not None:
1629            writer.write_attribute('id', obj.id)
1630        if obj.comment is not None:
1631            Writer.write_string(writer, 'comment', obj.comment)
1632        if obj.description is not None:
1633            Writer.write_string(writer, 'description', obj.description)
1634        if obj.name is not None:
1635            Writer.write_string(writer, 'name', obj.name)
1636        if obj.cluster is not None:
1637            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
1638        if obj.permissions is not None:
1639            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
1640        if obj.qos is not None:
1641            QosWriter.write_one(obj.qos, writer, 'qos')
1642        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1644    @staticmethod
1645    def write_many(objs, writer, singular=None, plural=None):
1646        if singular is None:
1647            singular = 'cpu_profile'
1648        if plural is None:
1649            plural = 'cpu_profiles'
1650        writer.write_start(plural)
1651        if type(objs) == List:
1652            href = objs.href
1653            if href is not None:
1654                writer.write_attribute('href', href)
1655        for obj in objs:
1656            CpuProfileWriter.write_one(obj, writer, singular)
1657        writer.write_end()
class CpuTopologyWriter(ovirtsdk4.writer.Writer):
1660class CpuTopologyWriter(Writer):
1661
1662    def __init__(self):
1663        super(CpuTopologyWriter, self).__init__()
1664
1665    @staticmethod
1666    def write_one(obj, writer, singular=None):
1667        if singular is None:
1668            singular = 'cpu_topology'
1669        writer.write_start(singular)
1670        href = obj.href
1671        if href is not None:
1672            writer.write_attribute('href', href)
1673        if obj.cores is not None:
1674            Writer.write_integer(writer, 'cores', obj.cores)
1675        if obj.sockets is not None:
1676            Writer.write_integer(writer, 'sockets', obj.sockets)
1677        if obj.threads is not None:
1678            Writer.write_integer(writer, 'threads', obj.threads)
1679        writer.write_end()
1680
1681    @staticmethod
1682    def write_many(objs, writer, singular=None, plural=None):
1683        if singular is None:
1684            singular = 'cpu_topology'
1685        if plural is None:
1686            plural = 'cpu_topologies'
1687        writer.write_start(plural)
1688        if type(objs) == List:
1689            href = objs.href
1690            if href is not None:
1691                writer.write_attribute('href', href)
1692        for obj in objs:
1693            CpuTopologyWriter.write_one(obj, writer, singular)
1694        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

CpuTopologyWriter()
1662    def __init__(self):
1663        super(CpuTopologyWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1665    @staticmethod
1666    def write_one(obj, writer, singular=None):
1667        if singular is None:
1668            singular = 'cpu_topology'
1669        writer.write_start(singular)
1670        href = obj.href
1671        if href is not None:
1672            writer.write_attribute('href', href)
1673        if obj.cores is not None:
1674            Writer.write_integer(writer, 'cores', obj.cores)
1675        if obj.sockets is not None:
1676            Writer.write_integer(writer, 'sockets', obj.sockets)
1677        if obj.threads is not None:
1678            Writer.write_integer(writer, 'threads', obj.threads)
1679        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1681    @staticmethod
1682    def write_many(objs, writer, singular=None, plural=None):
1683        if singular is None:
1684            singular = 'cpu_topology'
1685        if plural is None:
1686            plural = 'cpu_topologies'
1687        writer.write_start(plural)
1688        if type(objs) == List:
1689            href = objs.href
1690            if href is not None:
1691                writer.write_attribute('href', href)
1692        for obj in objs:
1693            CpuTopologyWriter.write_one(obj, writer, singular)
1694        writer.write_end()
class CpuTuneWriter(ovirtsdk4.writer.Writer):
1697class CpuTuneWriter(Writer):
1698
1699    def __init__(self):
1700        super(CpuTuneWriter, self).__init__()
1701
1702    @staticmethod
1703    def write_one(obj, writer, singular=None):
1704        if singular is None:
1705            singular = 'cpu_tune'
1706        writer.write_start(singular)
1707        href = obj.href
1708        if href is not None:
1709            writer.write_attribute('href', href)
1710        if obj.vcpu_pins is not None:
1711            VcpuPinWriter.write_many(obj.vcpu_pins, writer, 'vcpu_pin', 'vcpu_pins')
1712        writer.write_end()
1713
1714    @staticmethod
1715    def write_many(objs, writer, singular=None, plural=None):
1716        if singular is None:
1717            singular = 'cpu_tune'
1718        if plural is None:
1719            plural = 'cpu_tunes'
1720        writer.write_start(plural)
1721        if type(objs) == List:
1722            href = objs.href
1723            if href is not None:
1724                writer.write_attribute('href', href)
1725        for obj in objs:
1726            CpuTuneWriter.write_one(obj, writer, singular)
1727        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

CpuTuneWriter()
1699    def __init__(self):
1700        super(CpuTuneWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1702    @staticmethod
1703    def write_one(obj, writer, singular=None):
1704        if singular is None:
1705            singular = 'cpu_tune'
1706        writer.write_start(singular)
1707        href = obj.href
1708        if href is not None:
1709            writer.write_attribute('href', href)
1710        if obj.vcpu_pins is not None:
1711            VcpuPinWriter.write_many(obj.vcpu_pins, writer, 'vcpu_pin', 'vcpu_pins')
1712        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1714    @staticmethod
1715    def write_many(objs, writer, singular=None, plural=None):
1716        if singular is None:
1717            singular = 'cpu_tune'
1718        if plural is None:
1719            plural = 'cpu_tunes'
1720        writer.write_start(plural)
1721        if type(objs) == List:
1722            href = objs.href
1723            if href is not None:
1724                writer.write_attribute('href', href)
1725        for obj in objs:
1726            CpuTuneWriter.write_one(obj, writer, singular)
1727        writer.write_end()
class CpuTypeWriter(ovirtsdk4.writer.Writer):
1730class CpuTypeWriter(Writer):
1731
1732    def __init__(self):
1733        super(CpuTypeWriter, self).__init__()
1734
1735    @staticmethod
1736    def write_one(obj, writer, singular=None):
1737        if singular is None:
1738            singular = 'cpu_type'
1739        writer.write_start(singular)
1740        href = obj.href
1741        if href is not None:
1742            writer.write_attribute('href', href)
1743        if obj.architecture is not None:
1744            Writer.write_string(writer, 'architecture', obj.architecture.value)
1745        if obj.level is not None:
1746            Writer.write_integer(writer, 'level', obj.level)
1747        if obj.name is not None:
1748            Writer.write_string(writer, 'name', obj.name)
1749        writer.write_end()
1750
1751    @staticmethod
1752    def write_many(objs, writer, singular=None, plural=None):
1753        if singular is None:
1754            singular = 'cpu_type'
1755        if plural is None:
1756            plural = 'cpu_types'
1757        writer.write_start(plural)
1758        if type(objs) == List:
1759            href = objs.href
1760            if href is not None:
1761                writer.write_attribute('href', href)
1762        for obj in objs:
1763            CpuTypeWriter.write_one(obj, writer, singular)
1764        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

CpuTypeWriter()
1732    def __init__(self):
1733        super(CpuTypeWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1735    @staticmethod
1736    def write_one(obj, writer, singular=None):
1737        if singular is None:
1738            singular = 'cpu_type'
1739        writer.write_start(singular)
1740        href = obj.href
1741        if href is not None:
1742            writer.write_attribute('href', href)
1743        if obj.architecture is not None:
1744            Writer.write_string(writer, 'architecture', obj.architecture.value)
1745        if obj.level is not None:
1746            Writer.write_integer(writer, 'level', obj.level)
1747        if obj.name is not None:
1748            Writer.write_string(writer, 'name', obj.name)
1749        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1751    @staticmethod
1752    def write_many(objs, writer, singular=None, plural=None):
1753        if singular is None:
1754            singular = 'cpu_type'
1755        if plural is None:
1756            plural = 'cpu_types'
1757        writer.write_start(plural)
1758        if type(objs) == List:
1759            href = objs.href
1760            if href is not None:
1761                writer.write_attribute('href', href)
1762        for obj in objs:
1763            CpuTypeWriter.write_one(obj, writer, singular)
1764        writer.write_end()
class CustomPropertyWriter(ovirtsdk4.writer.Writer):
1767class CustomPropertyWriter(Writer):
1768
1769    def __init__(self):
1770        super(CustomPropertyWriter, self).__init__()
1771
1772    @staticmethod
1773    def write_one(obj, writer, singular=None):
1774        if singular is None:
1775            singular = 'custom_property'
1776        writer.write_start(singular)
1777        href = obj.href
1778        if href is not None:
1779            writer.write_attribute('href', href)
1780        if obj.name is not None:
1781            Writer.write_string(writer, 'name', obj.name)
1782        if obj.regexp is not None:
1783            Writer.write_string(writer, 'regexp', obj.regexp)
1784        if obj.value is not None:
1785            Writer.write_string(writer, 'value', obj.value)
1786        writer.write_end()
1787
1788    @staticmethod
1789    def write_many(objs, writer, singular=None, plural=None):
1790        if singular is None:
1791            singular = 'custom_property'
1792        if plural is None:
1793            plural = 'custom_properties'
1794        writer.write_start(plural)
1795        if type(objs) == List:
1796            href = objs.href
1797            if href is not None:
1798                writer.write_attribute('href', href)
1799        for obj in objs:
1800            CustomPropertyWriter.write_one(obj, writer, singular)
1801        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

CustomPropertyWriter()
1769    def __init__(self):
1770        super(CustomPropertyWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1772    @staticmethod
1773    def write_one(obj, writer, singular=None):
1774        if singular is None:
1775            singular = 'custom_property'
1776        writer.write_start(singular)
1777        href = obj.href
1778        if href is not None:
1779            writer.write_attribute('href', href)
1780        if obj.name is not None:
1781            Writer.write_string(writer, 'name', obj.name)
1782        if obj.regexp is not None:
1783            Writer.write_string(writer, 'regexp', obj.regexp)
1784        if obj.value is not None:
1785            Writer.write_string(writer, 'value', obj.value)
1786        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1788    @staticmethod
1789    def write_many(objs, writer, singular=None, plural=None):
1790        if singular is None:
1791            singular = 'custom_property'
1792        if plural is None:
1793            plural = 'custom_properties'
1794        writer.write_start(plural)
1795        if type(objs) == List:
1796            href = objs.href
1797            if href is not None:
1798                writer.write_attribute('href', href)
1799        for obj in objs:
1800            CustomPropertyWriter.write_one(obj, writer, singular)
1801        writer.write_end()
class DataCenterWriter(ovirtsdk4.writer.Writer):
1804class DataCenterWriter(Writer):
1805
1806    def __init__(self):
1807        super(DataCenterWriter, self).__init__()
1808
1809    @staticmethod
1810    def write_one(obj, writer, singular=None):
1811        if singular is None:
1812            singular = 'data_center'
1813        writer.write_start(singular)
1814        href = obj.href
1815        if href is not None:
1816            writer.write_attribute('href', href)
1817        if obj.id is not None:
1818            writer.write_attribute('id', obj.id)
1819        if obj.comment is not None:
1820            Writer.write_string(writer, 'comment', obj.comment)
1821        if obj.description is not None:
1822            Writer.write_string(writer, 'description', obj.description)
1823        if obj.local is not None:
1824            Writer.write_boolean(writer, 'local', obj.local)
1825        if obj.name is not None:
1826            Writer.write_string(writer, 'name', obj.name)
1827        if obj.quota_mode is not None:
1828            Writer.write_string(writer, 'quota_mode', obj.quota_mode.value)
1829        if obj.status is not None:
1830            Writer.write_string(writer, 'status', obj.status.value)
1831        if obj.storage_format is not None:
1832            Writer.write_string(writer, 'storage_format', obj.storage_format.value)
1833        if obj.supported_versions is not None:
1834            VersionWriter.write_many(obj.supported_versions, writer, 'version', 'supported_versions')
1835        if obj.version is not None:
1836            VersionWriter.write_one(obj.version, writer, 'version')
1837        if obj.clusters is not None:
1838            ClusterWriter.write_many(obj.clusters, writer, 'cluster', 'clusters')
1839        if obj.iscsi_bonds is not None:
1840            IscsiBondWriter.write_many(obj.iscsi_bonds, writer, 'iscsi_bond', 'iscsi_bonds')
1841        if obj.mac_pool is not None:
1842            MacPoolWriter.write_one(obj.mac_pool, writer, 'mac_pool')
1843        if obj.networks is not None:
1844            NetworkWriter.write_many(obj.networks, writer, 'network', 'networks')
1845        if obj.permissions is not None:
1846            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
1847        if obj.qoss is not None:
1848            QosWriter.write_many(obj.qoss, writer, 'qos', 'qoss')
1849        if obj.quotas is not None:
1850            QuotaWriter.write_many(obj.quotas, writer, 'quota', 'quotas')
1851        if obj.storage_domains is not None:
1852            StorageDomainWriter.write_many(obj.storage_domains, writer, 'storage_domain', 'storage_domains')
1853        writer.write_end()
1854
1855    @staticmethod
1856    def write_many(objs, writer, singular=None, plural=None):
1857        if singular is None:
1858            singular = 'data_center'
1859        if plural is None:
1860            plural = 'data_centers'
1861        writer.write_start(plural)
1862        if type(objs) == List:
1863            href = objs.href
1864            if href is not None:
1865                writer.write_attribute('href', href)
1866        for obj in objs:
1867            DataCenterWriter.write_one(obj, writer, singular)
1868        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

DataCenterWriter()
1806    def __init__(self):
1807        super(DataCenterWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1809    @staticmethod
1810    def write_one(obj, writer, singular=None):
1811        if singular is None:
1812            singular = 'data_center'
1813        writer.write_start(singular)
1814        href = obj.href
1815        if href is not None:
1816            writer.write_attribute('href', href)
1817        if obj.id is not None:
1818            writer.write_attribute('id', obj.id)
1819        if obj.comment is not None:
1820            Writer.write_string(writer, 'comment', obj.comment)
1821        if obj.description is not None:
1822            Writer.write_string(writer, 'description', obj.description)
1823        if obj.local is not None:
1824            Writer.write_boolean(writer, 'local', obj.local)
1825        if obj.name is not None:
1826            Writer.write_string(writer, 'name', obj.name)
1827        if obj.quota_mode is not None:
1828            Writer.write_string(writer, 'quota_mode', obj.quota_mode.value)
1829        if obj.status is not None:
1830            Writer.write_string(writer, 'status', obj.status.value)
1831        if obj.storage_format is not None:
1832            Writer.write_string(writer, 'storage_format', obj.storage_format.value)
1833        if obj.supported_versions is not None:
1834            VersionWriter.write_many(obj.supported_versions, writer, 'version', 'supported_versions')
1835        if obj.version is not None:
1836            VersionWriter.write_one(obj.version, writer, 'version')
1837        if obj.clusters is not None:
1838            ClusterWriter.write_many(obj.clusters, writer, 'cluster', 'clusters')
1839        if obj.iscsi_bonds is not None:
1840            IscsiBondWriter.write_many(obj.iscsi_bonds, writer, 'iscsi_bond', 'iscsi_bonds')
1841        if obj.mac_pool is not None:
1842            MacPoolWriter.write_one(obj.mac_pool, writer, 'mac_pool')
1843        if obj.networks is not None:
1844            NetworkWriter.write_many(obj.networks, writer, 'network', 'networks')
1845        if obj.permissions is not None:
1846            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
1847        if obj.qoss is not None:
1848            QosWriter.write_many(obj.qoss, writer, 'qos', 'qoss')
1849        if obj.quotas is not None:
1850            QuotaWriter.write_many(obj.quotas, writer, 'quota', 'quotas')
1851        if obj.storage_domains is not None:
1852            StorageDomainWriter.write_many(obj.storage_domains, writer, 'storage_domain', 'storage_domains')
1853        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1855    @staticmethod
1856    def write_many(objs, writer, singular=None, plural=None):
1857        if singular is None:
1858            singular = 'data_center'
1859        if plural is None:
1860            plural = 'data_centers'
1861        writer.write_start(plural)
1862        if type(objs) == List:
1863            href = objs.href
1864            if href is not None:
1865                writer.write_attribute('href', href)
1866        for obj in objs:
1867            DataCenterWriter.write_one(obj, writer, singular)
1868        writer.write_end()
class DeviceWriter(ovirtsdk4.writer.Writer):
1871class DeviceWriter(Writer):
1872
1873    def __init__(self):
1874        super(DeviceWriter, self).__init__()
1875
1876    @staticmethod
1877    def write_one(obj, writer, singular=None):
1878        if singular is None:
1879            singular = 'device'
1880        writer.write_start(singular)
1881        href = obj.href
1882        if href is not None:
1883            writer.write_attribute('href', href)
1884        if obj.id is not None:
1885            writer.write_attribute('id', obj.id)
1886        if obj.comment is not None:
1887            Writer.write_string(writer, 'comment', obj.comment)
1888        if obj.description is not None:
1889            Writer.write_string(writer, 'description', obj.description)
1890        if obj.name is not None:
1891            Writer.write_string(writer, 'name', obj.name)
1892        if obj.instance_type is not None:
1893            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
1894        if obj.template is not None:
1895            TemplateWriter.write_one(obj.template, writer, 'template')
1896        if obj.vm is not None:
1897            VmWriter.write_one(obj.vm, writer, 'vm')
1898        if obj.vms is not None:
1899            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
1900        writer.write_end()
1901
1902    @staticmethod
1903    def write_many(objs, writer, singular=None, plural=None):
1904        if singular is None:
1905            singular = 'device'
1906        if plural is None:
1907            plural = 'devices'
1908        writer.write_start(plural)
1909        if type(objs) == List:
1910            href = objs.href
1911            if href is not None:
1912                writer.write_attribute('href', href)
1913        for obj in objs:
1914            DeviceWriter.write_one(obj, writer, singular)
1915        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

DeviceWriter()
1873    def __init__(self):
1874        super(DeviceWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1876    @staticmethod
1877    def write_one(obj, writer, singular=None):
1878        if singular is None:
1879            singular = 'device'
1880        writer.write_start(singular)
1881        href = obj.href
1882        if href is not None:
1883            writer.write_attribute('href', href)
1884        if obj.id is not None:
1885            writer.write_attribute('id', obj.id)
1886        if obj.comment is not None:
1887            Writer.write_string(writer, 'comment', obj.comment)
1888        if obj.description is not None:
1889            Writer.write_string(writer, 'description', obj.description)
1890        if obj.name is not None:
1891            Writer.write_string(writer, 'name', obj.name)
1892        if obj.instance_type is not None:
1893            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
1894        if obj.template is not None:
1895            TemplateWriter.write_one(obj.template, writer, 'template')
1896        if obj.vm is not None:
1897            VmWriter.write_one(obj.vm, writer, 'vm')
1898        if obj.vms is not None:
1899            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
1900        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
1902    @staticmethod
1903    def write_many(objs, writer, singular=None, plural=None):
1904        if singular is None:
1905            singular = 'device'
1906        if plural is None:
1907            plural = 'devices'
1908        writer.write_start(plural)
1909        if type(objs) == List:
1910            href = objs.href
1911            if href is not None:
1912                writer.write_attribute('href', href)
1913        for obj in objs:
1914            DeviceWriter.write_one(obj, writer, singular)
1915        writer.write_end()
class DiskWriter(ovirtsdk4.writer.Writer):
1918class DiskWriter(Writer):
1919
1920    def __init__(self):
1921        super(DiskWriter, self).__init__()
1922
1923    @staticmethod
1924    def write_one(obj, writer, singular=None):
1925        if singular is None:
1926            singular = 'disk'
1927        writer.write_start(singular)
1928        href = obj.href
1929        if href is not None:
1930            writer.write_attribute('href', href)
1931        if obj.id is not None:
1932            writer.write_attribute('id', obj.id)
1933        if obj.active is not None:
1934            Writer.write_boolean(writer, 'active', obj.active)
1935        if obj.actual_size is not None:
1936            Writer.write_integer(writer, 'actual_size', obj.actual_size)
1937        if obj.alias is not None:
1938            Writer.write_string(writer, 'alias', obj.alias)
1939        if obj.backup is not None:
1940            Writer.write_string(writer, 'backup', obj.backup.value)
1941        if obj.backup_mode is not None:
1942            Writer.write_string(writer, 'backup_mode', obj.backup_mode.value)
1943        if obj.bootable is not None:
1944            Writer.write_boolean(writer, 'bootable', obj.bootable)
1945        if obj.comment is not None:
1946            Writer.write_string(writer, 'comment', obj.comment)
1947        if obj.content_type is not None:
1948            Writer.write_string(writer, 'content_type', obj.content_type.value)
1949        if obj.description is not None:
1950            Writer.write_string(writer, 'description', obj.description)
1951        if obj.external_disk is not None:
1952            Writer.write_string(writer, 'external_disk', obj.external_disk)
1953        if obj.format is not None:
1954            Writer.write_string(writer, 'format', obj.format.value)
1955        if obj.image_id is not None:
1956            Writer.write_string(writer, 'image_id', obj.image_id)
1957        if obj.initial_size is not None:
1958            Writer.write_integer(writer, 'initial_size', obj.initial_size)
1959        if obj.interface is not None:
1960            Writer.write_string(writer, 'interface', obj.interface.value)
1961        if obj.logical_name is not None:
1962            Writer.write_string(writer, 'logical_name', obj.logical_name)
1963        if obj.lun_storage is not None:
1964            HostStorageWriter.write_one(obj.lun_storage, writer, 'lun_storage')
1965        if obj.name is not None:
1966            Writer.write_string(writer, 'name', obj.name)
1967        if obj.propagate_errors is not None:
1968            Writer.write_boolean(writer, 'propagate_errors', obj.propagate_errors)
1969        if obj.provisioned_size is not None:
1970            Writer.write_integer(writer, 'provisioned_size', obj.provisioned_size)
1971        if obj.qcow_version is not None:
1972            Writer.write_string(writer, 'qcow_version', obj.qcow_version.value)
1973        if obj.read_only is not None:
1974            Writer.write_boolean(writer, 'read_only', obj.read_only)
1975        if obj.sgio is not None:
1976            Writer.write_string(writer, 'sgio', obj.sgio.value)
1977        if obj.shareable is not None:
1978            Writer.write_boolean(writer, 'shareable', obj.shareable)
1979        if obj.sparse is not None:
1980            Writer.write_boolean(writer, 'sparse', obj.sparse)
1981        if obj.status is not None:
1982            Writer.write_string(writer, 'status', obj.status.value)
1983        if obj.storage_type is not None:
1984            Writer.write_string(writer, 'storage_type', obj.storage_type.value)
1985        if obj.total_size is not None:
1986            Writer.write_integer(writer, 'total_size', obj.total_size)
1987        if obj.uses_scsi_reservation is not None:
1988            Writer.write_boolean(writer, 'uses_scsi_reservation', obj.uses_scsi_reservation)
1989        if obj.wipe_after_delete is not None:
1990            Writer.write_boolean(writer, 'wipe_after_delete', obj.wipe_after_delete)
1991        if obj.disk_profile is not None:
1992            DiskProfileWriter.write_one(obj.disk_profile, writer, 'disk_profile')
1993        if obj.disk_snapshots is not None:
1994            DiskSnapshotWriter.write_many(obj.disk_snapshots, writer, 'disk_snapshot', 'disk_snapshots')
1995        if obj.instance_type is not None:
1996            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
1997        if obj.openstack_volume_type is not None:
1998            OpenStackVolumeTypeWriter.write_one(obj.openstack_volume_type, writer, 'openstack_volume_type')
1999        if obj.permissions is not None:
2000            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
2001        if obj.quota is not None:
2002            QuotaWriter.write_one(obj.quota, writer, 'quota')
2003        if obj.snapshot is not None:
2004            SnapshotWriter.write_one(obj.snapshot, writer, 'snapshot')
2005        if obj.statistics is not None:
2006            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
2007        if obj.storage_domain is not None:
2008            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
2009        if obj.storage_domains is not None:
2010            StorageDomainWriter.write_many(obj.storage_domains, writer, 'storage_domain', 'storage_domains')
2011        if obj.template is not None:
2012            TemplateWriter.write_one(obj.template, writer, 'template')
2013        if obj.vm is not None:
2014            VmWriter.write_one(obj.vm, writer, 'vm')
2015        if obj.vms is not None:
2016            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
2017        writer.write_end()
2018
2019    @staticmethod
2020    def write_many(objs, writer, singular=None, plural=None):
2021        if singular is None:
2022            singular = 'disk'
2023        if plural is None:
2024            plural = 'disks'
2025        writer.write_start(plural)
2026        if type(objs) == List:
2027            href = objs.href
2028            if href is not None:
2029                writer.write_attribute('href', href)
2030        for obj in objs:
2031            DiskWriter.write_one(obj, writer, singular)
2032        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

DiskWriter()
1920    def __init__(self):
1921        super(DiskWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
1923    @staticmethod
1924    def write_one(obj, writer, singular=None):
1925        if singular is None:
1926            singular = 'disk'
1927        writer.write_start(singular)
1928        href = obj.href
1929        if href is not None:
1930            writer.write_attribute('href', href)
1931        if obj.id is not None:
1932            writer.write_attribute('id', obj.id)
1933        if obj.active is not None:
1934            Writer.write_boolean(writer, 'active', obj.active)
1935        if obj.actual_size is not None:
1936            Writer.write_integer(writer, 'actual_size', obj.actual_size)
1937        if obj.alias is not None:
1938            Writer.write_string(writer, 'alias', obj.alias)
1939        if obj.backup is not None:
1940            Writer.write_string(writer, 'backup', obj.backup.value)
1941        if obj.backup_mode is not None:
1942            Writer.write_string(writer, 'backup_mode', obj.backup_mode.value)
1943        if obj.bootable is not None:
1944            Writer.write_boolean(writer, 'bootable', obj.bootable)
1945        if obj.comment is not None:
1946            Writer.write_string(writer, 'comment', obj.comment)
1947        if obj.content_type is not None:
1948            Writer.write_string(writer, 'content_type', obj.content_type.value)
1949        if obj.description is not None:
1950            Writer.write_string(writer, 'description', obj.description)
1951        if obj.external_disk is not None:
1952            Writer.write_string(writer, 'external_disk', obj.external_disk)
1953        if obj.format is not None:
1954            Writer.write_string(writer, 'format', obj.format.value)
1955        if obj.image_id is not None:
1956            Writer.write_string(writer, 'image_id', obj.image_id)
1957        if obj.initial_size is not None:
1958            Writer.write_integer(writer, 'initial_size', obj.initial_size)
1959        if obj.interface is not None:
1960            Writer.write_string(writer, 'interface', obj.interface.value)
1961        if obj.logical_name is not None:
1962            Writer.write_string(writer, 'logical_name', obj.logical_name)
1963        if obj.lun_storage is not None:
1964            HostStorageWriter.write_one(obj.lun_storage, writer, 'lun_storage')
1965        if obj.name is not None:
1966            Writer.write_string(writer, 'name', obj.name)
1967        if obj.propagate_errors is not None:
1968            Writer.write_boolean(writer, 'propagate_errors', obj.propagate_errors)
1969        if obj.provisioned_size is not None:
1970            Writer.write_integer(writer, 'provisioned_size', obj.provisioned_size)
1971        if obj.qcow_version is not None:
1972            Writer.write_string(writer, 'qcow_version', obj.qcow_version.value)
1973        if obj.read_only is not None:
1974            Writer.write_boolean(writer, 'read_only', obj.read_only)
1975        if obj.sgio is not None:
1976            Writer.write_string(writer, 'sgio', obj.sgio.value)
1977        if obj.shareable is not None:
1978            Writer.write_boolean(writer, 'shareable', obj.shareable)
1979        if obj.sparse is not None:
1980            Writer.write_boolean(writer, 'sparse', obj.sparse)
1981        if obj.status is not None:
1982            Writer.write_string(writer, 'status', obj.status.value)
1983        if obj.storage_type is not None:
1984            Writer.write_string(writer, 'storage_type', obj.storage_type.value)
1985        if obj.total_size is not None:
1986            Writer.write_integer(writer, 'total_size', obj.total_size)
1987        if obj.uses_scsi_reservation is not None:
1988            Writer.write_boolean(writer, 'uses_scsi_reservation', obj.uses_scsi_reservation)
1989        if obj.wipe_after_delete is not None:
1990            Writer.write_boolean(writer, 'wipe_after_delete', obj.wipe_after_delete)
1991        if obj.disk_profile is not None:
1992            DiskProfileWriter.write_one(obj.disk_profile, writer, 'disk_profile')
1993        if obj.disk_snapshots is not None:
1994            DiskSnapshotWriter.write_many(obj.disk_snapshots, writer, 'disk_snapshot', 'disk_snapshots')
1995        if obj.instance_type is not None:
1996            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
1997        if obj.openstack_volume_type is not None:
1998            OpenStackVolumeTypeWriter.write_one(obj.openstack_volume_type, writer, 'openstack_volume_type')
1999        if obj.permissions is not None:
2000            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
2001        if obj.quota is not None:
2002            QuotaWriter.write_one(obj.quota, writer, 'quota')
2003        if obj.snapshot is not None:
2004            SnapshotWriter.write_one(obj.snapshot, writer, 'snapshot')
2005        if obj.statistics is not None:
2006            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
2007        if obj.storage_domain is not None:
2008            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
2009        if obj.storage_domains is not None:
2010            StorageDomainWriter.write_many(obj.storage_domains, writer, 'storage_domain', 'storage_domains')
2011        if obj.template is not None:
2012            TemplateWriter.write_one(obj.template, writer, 'template')
2013        if obj.vm is not None:
2014            VmWriter.write_one(obj.vm, writer, 'vm')
2015        if obj.vms is not None:
2016            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
2017        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2019    @staticmethod
2020    def write_many(objs, writer, singular=None, plural=None):
2021        if singular is None:
2022            singular = 'disk'
2023        if plural is None:
2024            plural = 'disks'
2025        writer.write_start(plural)
2026        if type(objs) == List:
2027            href = objs.href
2028            if href is not None:
2029                writer.write_attribute('href', href)
2030        for obj in objs:
2031            DiskWriter.write_one(obj, writer, singular)
2032        writer.write_end()
class DiskAttachmentWriter(ovirtsdk4.writer.Writer):
2035class DiskAttachmentWriter(Writer):
2036
2037    def __init__(self):
2038        super(DiskAttachmentWriter, self).__init__()
2039
2040    @staticmethod
2041    def write_one(obj, writer, singular=None):
2042        if singular is None:
2043            singular = 'disk_attachment'
2044        writer.write_start(singular)
2045        href = obj.href
2046        if href is not None:
2047            writer.write_attribute('href', href)
2048        if obj.id is not None:
2049            writer.write_attribute('id', obj.id)
2050        if obj.active is not None:
2051            Writer.write_boolean(writer, 'active', obj.active)
2052        if obj.bootable is not None:
2053            Writer.write_boolean(writer, 'bootable', obj.bootable)
2054        if obj.comment is not None:
2055            Writer.write_string(writer, 'comment', obj.comment)
2056        if obj.description is not None:
2057            Writer.write_string(writer, 'description', obj.description)
2058        if obj.interface is not None:
2059            Writer.write_string(writer, 'interface', obj.interface.value)
2060        if obj.logical_name is not None:
2061            Writer.write_string(writer, 'logical_name', obj.logical_name)
2062        if obj.name is not None:
2063            Writer.write_string(writer, 'name', obj.name)
2064        if obj.pass_discard is not None:
2065            Writer.write_boolean(writer, 'pass_discard', obj.pass_discard)
2066        if obj.read_only is not None:
2067            Writer.write_boolean(writer, 'read_only', obj.read_only)
2068        if obj.uses_scsi_reservation is not None:
2069            Writer.write_boolean(writer, 'uses_scsi_reservation', obj.uses_scsi_reservation)
2070        if obj.disk is not None:
2071            DiskWriter.write_one(obj.disk, writer, 'disk')
2072        if obj.template is not None:
2073            TemplateWriter.write_one(obj.template, writer, 'template')
2074        if obj.vm is not None:
2075            VmWriter.write_one(obj.vm, writer, 'vm')
2076        writer.write_end()
2077
2078    @staticmethod
2079    def write_many(objs, writer, singular=None, plural=None):
2080        if singular is None:
2081            singular = 'disk_attachment'
2082        if plural is None:
2083            plural = 'disk_attachments'
2084        writer.write_start(plural)
2085        if type(objs) == List:
2086            href = objs.href
2087            if href is not None:
2088                writer.write_attribute('href', href)
2089        for obj in objs:
2090            DiskAttachmentWriter.write_one(obj, writer, singular)
2091        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

DiskAttachmentWriter()
2037    def __init__(self):
2038        super(DiskAttachmentWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2040    @staticmethod
2041    def write_one(obj, writer, singular=None):
2042        if singular is None:
2043            singular = 'disk_attachment'
2044        writer.write_start(singular)
2045        href = obj.href
2046        if href is not None:
2047            writer.write_attribute('href', href)
2048        if obj.id is not None:
2049            writer.write_attribute('id', obj.id)
2050        if obj.active is not None:
2051            Writer.write_boolean(writer, 'active', obj.active)
2052        if obj.bootable is not None:
2053            Writer.write_boolean(writer, 'bootable', obj.bootable)
2054        if obj.comment is not None:
2055            Writer.write_string(writer, 'comment', obj.comment)
2056        if obj.description is not None:
2057            Writer.write_string(writer, 'description', obj.description)
2058        if obj.interface is not None:
2059            Writer.write_string(writer, 'interface', obj.interface.value)
2060        if obj.logical_name is not None:
2061            Writer.write_string(writer, 'logical_name', obj.logical_name)
2062        if obj.name is not None:
2063            Writer.write_string(writer, 'name', obj.name)
2064        if obj.pass_discard is not None:
2065            Writer.write_boolean(writer, 'pass_discard', obj.pass_discard)
2066        if obj.read_only is not None:
2067            Writer.write_boolean(writer, 'read_only', obj.read_only)
2068        if obj.uses_scsi_reservation is not None:
2069            Writer.write_boolean(writer, 'uses_scsi_reservation', obj.uses_scsi_reservation)
2070        if obj.disk is not None:
2071            DiskWriter.write_one(obj.disk, writer, 'disk')
2072        if obj.template is not None:
2073            TemplateWriter.write_one(obj.template, writer, 'template')
2074        if obj.vm is not None:
2075            VmWriter.write_one(obj.vm, writer, 'vm')
2076        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2078    @staticmethod
2079    def write_many(objs, writer, singular=None, plural=None):
2080        if singular is None:
2081            singular = 'disk_attachment'
2082        if plural is None:
2083            plural = 'disk_attachments'
2084        writer.write_start(plural)
2085        if type(objs) == List:
2086            href = objs.href
2087            if href is not None:
2088                writer.write_attribute('href', href)
2089        for obj in objs:
2090            DiskAttachmentWriter.write_one(obj, writer, singular)
2091        writer.write_end()
class DiskProfileWriter(ovirtsdk4.writer.Writer):
2094class DiskProfileWriter(Writer):
2095
2096    def __init__(self):
2097        super(DiskProfileWriter, self).__init__()
2098
2099    @staticmethod
2100    def write_one(obj, writer, singular=None):
2101        if singular is None:
2102            singular = 'disk_profile'
2103        writer.write_start(singular)
2104        href = obj.href
2105        if href is not None:
2106            writer.write_attribute('href', href)
2107        if obj.id is not None:
2108            writer.write_attribute('id', obj.id)
2109        if obj.comment is not None:
2110            Writer.write_string(writer, 'comment', obj.comment)
2111        if obj.description is not None:
2112            Writer.write_string(writer, 'description', obj.description)
2113        if obj.name is not None:
2114            Writer.write_string(writer, 'name', obj.name)
2115        if obj.permissions is not None:
2116            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
2117        if obj.qos is not None:
2118            QosWriter.write_one(obj.qos, writer, 'qos')
2119        if obj.storage_domain is not None:
2120            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
2121        writer.write_end()
2122
2123    @staticmethod
2124    def write_many(objs, writer, singular=None, plural=None):
2125        if singular is None:
2126            singular = 'disk_profile'
2127        if plural is None:
2128            plural = 'disk_profiles'
2129        writer.write_start(plural)
2130        if type(objs) == List:
2131            href = objs.href
2132            if href is not None:
2133                writer.write_attribute('href', href)
2134        for obj in objs:
2135            DiskProfileWriter.write_one(obj, writer, singular)
2136        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

DiskProfileWriter()
2096    def __init__(self):
2097        super(DiskProfileWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2099    @staticmethod
2100    def write_one(obj, writer, singular=None):
2101        if singular is None:
2102            singular = 'disk_profile'
2103        writer.write_start(singular)
2104        href = obj.href
2105        if href is not None:
2106            writer.write_attribute('href', href)
2107        if obj.id is not None:
2108            writer.write_attribute('id', obj.id)
2109        if obj.comment is not None:
2110            Writer.write_string(writer, 'comment', obj.comment)
2111        if obj.description is not None:
2112            Writer.write_string(writer, 'description', obj.description)
2113        if obj.name is not None:
2114            Writer.write_string(writer, 'name', obj.name)
2115        if obj.permissions is not None:
2116            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
2117        if obj.qos is not None:
2118            QosWriter.write_one(obj.qos, writer, 'qos')
2119        if obj.storage_domain is not None:
2120            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
2121        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2123    @staticmethod
2124    def write_many(objs, writer, singular=None, plural=None):
2125        if singular is None:
2126            singular = 'disk_profile'
2127        if plural is None:
2128            plural = 'disk_profiles'
2129        writer.write_start(plural)
2130        if type(objs) == List:
2131            href = objs.href
2132            if href is not None:
2133                writer.write_attribute('href', href)
2134        for obj in objs:
2135            DiskProfileWriter.write_one(obj, writer, singular)
2136        writer.write_end()
class DiskSnapshotWriter(ovirtsdk4.writer.Writer):
2139class DiskSnapshotWriter(Writer):
2140
2141    def __init__(self):
2142        super(DiskSnapshotWriter, self).__init__()
2143
2144    @staticmethod
2145    def write_one(obj, writer, singular=None):
2146        if singular is None:
2147            singular = 'disk_snapshot'
2148        writer.write_start(singular)
2149        href = obj.href
2150        if href is not None:
2151            writer.write_attribute('href', href)
2152        if obj.id is not None:
2153            writer.write_attribute('id', obj.id)
2154        if obj.active is not None:
2155            Writer.write_boolean(writer, 'active', obj.active)
2156        if obj.actual_size is not None:
2157            Writer.write_integer(writer, 'actual_size', obj.actual_size)
2158        if obj.alias is not None:
2159            Writer.write_string(writer, 'alias', obj.alias)
2160        if obj.backup is not None:
2161            Writer.write_string(writer, 'backup', obj.backup.value)
2162        if obj.backup_mode is not None:
2163            Writer.write_string(writer, 'backup_mode', obj.backup_mode.value)
2164        if obj.bootable is not None:
2165            Writer.write_boolean(writer, 'bootable', obj.bootable)
2166        if obj.comment is not None:
2167            Writer.write_string(writer, 'comment', obj.comment)
2168        if obj.content_type is not None:
2169            Writer.write_string(writer, 'content_type', obj.content_type.value)
2170        if obj.description is not None:
2171            Writer.write_string(writer, 'description', obj.description)
2172        if obj.external_disk is not None:
2173            Writer.write_string(writer, 'external_disk', obj.external_disk)
2174        if obj.format is not None:
2175            Writer.write_string(writer, 'format', obj.format.value)
2176        if obj.image_id is not None:
2177            Writer.write_string(writer, 'image_id', obj.image_id)
2178        if obj.initial_size is not None:
2179            Writer.write_integer(writer, 'initial_size', obj.initial_size)
2180        if obj.interface is not None:
2181            Writer.write_string(writer, 'interface', obj.interface.value)
2182        if obj.logical_name is not None:
2183            Writer.write_string(writer, 'logical_name', obj.logical_name)
2184        if obj.lun_storage is not None:
2185            HostStorageWriter.write_one(obj.lun_storage, writer, 'lun_storage')
2186        if obj.name is not None:
2187            Writer.write_string(writer, 'name', obj.name)
2188        if obj.propagate_errors is not None:
2189            Writer.write_boolean(writer, 'propagate_errors', obj.propagate_errors)
2190        if obj.provisioned_size is not None:
2191            Writer.write_integer(writer, 'provisioned_size', obj.provisioned_size)
2192        if obj.qcow_version is not None:
2193            Writer.write_string(writer, 'qcow_version', obj.qcow_version.value)
2194        if obj.read_only is not None:
2195            Writer.write_boolean(writer, 'read_only', obj.read_only)
2196        if obj.sgio is not None:
2197            Writer.write_string(writer, 'sgio', obj.sgio.value)
2198        if obj.shareable is not None:
2199            Writer.write_boolean(writer, 'shareable', obj.shareable)
2200        if obj.sparse is not None:
2201            Writer.write_boolean(writer, 'sparse', obj.sparse)
2202        if obj.status is not None:
2203            Writer.write_string(writer, 'status', obj.status.value)
2204        if obj.storage_type is not None:
2205            Writer.write_string(writer, 'storage_type', obj.storage_type.value)
2206        if obj.total_size is not None:
2207            Writer.write_integer(writer, 'total_size', obj.total_size)
2208        if obj.uses_scsi_reservation is not None:
2209            Writer.write_boolean(writer, 'uses_scsi_reservation', obj.uses_scsi_reservation)
2210        if obj.wipe_after_delete is not None:
2211            Writer.write_boolean(writer, 'wipe_after_delete', obj.wipe_after_delete)
2212        if obj.disk is not None:
2213            DiskWriter.write_one(obj.disk, writer, 'disk')
2214        if obj.disk_profile is not None:
2215            DiskProfileWriter.write_one(obj.disk_profile, writer, 'disk_profile')
2216        if obj.disk_snapshots is not None:
2217            DiskSnapshotWriter.write_many(obj.disk_snapshots, writer, 'disk_snapshot', 'disk_snapshots')
2218        if obj.instance_type is not None:
2219            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
2220        if obj.openstack_volume_type is not None:
2221            OpenStackVolumeTypeWriter.write_one(obj.openstack_volume_type, writer, 'openstack_volume_type')
2222        if obj.parent is not None:
2223            DiskSnapshotWriter.write_one(obj.parent, writer, 'parent')
2224        if obj.permissions is not None:
2225            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
2226        if obj.quota is not None:
2227            QuotaWriter.write_one(obj.quota, writer, 'quota')
2228        if obj.snapshot is not None:
2229            SnapshotWriter.write_one(obj.snapshot, writer, 'snapshot')
2230        if obj.statistics is not None:
2231            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
2232        if obj.storage_domain is not None:
2233            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
2234        if obj.storage_domains is not None:
2235            StorageDomainWriter.write_many(obj.storage_domains, writer, 'storage_domain', 'storage_domains')
2236        if obj.template is not None:
2237            TemplateWriter.write_one(obj.template, writer, 'template')
2238        if obj.vm is not None:
2239            VmWriter.write_one(obj.vm, writer, 'vm')
2240        if obj.vms is not None:
2241            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
2242        writer.write_end()
2243
2244    @staticmethod
2245    def write_many(objs, writer, singular=None, plural=None):
2246        if singular is None:
2247            singular = 'disk_snapshot'
2248        if plural is None:
2249            plural = 'disk_snapshots'
2250        writer.write_start(plural)
2251        if type(objs) == List:
2252            href = objs.href
2253            if href is not None:
2254                writer.write_attribute('href', href)
2255        for obj in objs:
2256            DiskSnapshotWriter.write_one(obj, writer, singular)
2257        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

DiskSnapshotWriter()
2141    def __init__(self):
2142        super(DiskSnapshotWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2144    @staticmethod
2145    def write_one(obj, writer, singular=None):
2146        if singular is None:
2147            singular = 'disk_snapshot'
2148        writer.write_start(singular)
2149        href = obj.href
2150        if href is not None:
2151            writer.write_attribute('href', href)
2152        if obj.id is not None:
2153            writer.write_attribute('id', obj.id)
2154        if obj.active is not None:
2155            Writer.write_boolean(writer, 'active', obj.active)
2156        if obj.actual_size is not None:
2157            Writer.write_integer(writer, 'actual_size', obj.actual_size)
2158        if obj.alias is not None:
2159            Writer.write_string(writer, 'alias', obj.alias)
2160        if obj.backup is not None:
2161            Writer.write_string(writer, 'backup', obj.backup.value)
2162        if obj.backup_mode is not None:
2163            Writer.write_string(writer, 'backup_mode', obj.backup_mode.value)
2164        if obj.bootable is not None:
2165            Writer.write_boolean(writer, 'bootable', obj.bootable)
2166        if obj.comment is not None:
2167            Writer.write_string(writer, 'comment', obj.comment)
2168        if obj.content_type is not None:
2169            Writer.write_string(writer, 'content_type', obj.content_type.value)
2170        if obj.description is not None:
2171            Writer.write_string(writer, 'description', obj.description)
2172        if obj.external_disk is not None:
2173            Writer.write_string(writer, 'external_disk', obj.external_disk)
2174        if obj.format is not None:
2175            Writer.write_string(writer, 'format', obj.format.value)
2176        if obj.image_id is not None:
2177            Writer.write_string(writer, 'image_id', obj.image_id)
2178        if obj.initial_size is not None:
2179            Writer.write_integer(writer, 'initial_size', obj.initial_size)
2180        if obj.interface is not None:
2181            Writer.write_string(writer, 'interface', obj.interface.value)
2182        if obj.logical_name is not None:
2183            Writer.write_string(writer, 'logical_name', obj.logical_name)
2184        if obj.lun_storage is not None:
2185            HostStorageWriter.write_one(obj.lun_storage, writer, 'lun_storage')
2186        if obj.name is not None:
2187            Writer.write_string(writer, 'name', obj.name)
2188        if obj.propagate_errors is not None:
2189            Writer.write_boolean(writer, 'propagate_errors', obj.propagate_errors)
2190        if obj.provisioned_size is not None:
2191            Writer.write_integer(writer, 'provisioned_size', obj.provisioned_size)
2192        if obj.qcow_version is not None:
2193            Writer.write_string(writer, 'qcow_version', obj.qcow_version.value)
2194        if obj.read_only is not None:
2195            Writer.write_boolean(writer, 'read_only', obj.read_only)
2196        if obj.sgio is not None:
2197            Writer.write_string(writer, 'sgio', obj.sgio.value)
2198        if obj.shareable is not None:
2199            Writer.write_boolean(writer, 'shareable', obj.shareable)
2200        if obj.sparse is not None:
2201            Writer.write_boolean(writer, 'sparse', obj.sparse)
2202        if obj.status is not None:
2203            Writer.write_string(writer, 'status', obj.status.value)
2204        if obj.storage_type is not None:
2205            Writer.write_string(writer, 'storage_type', obj.storage_type.value)
2206        if obj.total_size is not None:
2207            Writer.write_integer(writer, 'total_size', obj.total_size)
2208        if obj.uses_scsi_reservation is not None:
2209            Writer.write_boolean(writer, 'uses_scsi_reservation', obj.uses_scsi_reservation)
2210        if obj.wipe_after_delete is not None:
2211            Writer.write_boolean(writer, 'wipe_after_delete', obj.wipe_after_delete)
2212        if obj.disk is not None:
2213            DiskWriter.write_one(obj.disk, writer, 'disk')
2214        if obj.disk_profile is not None:
2215            DiskProfileWriter.write_one(obj.disk_profile, writer, 'disk_profile')
2216        if obj.disk_snapshots is not None:
2217            DiskSnapshotWriter.write_many(obj.disk_snapshots, writer, 'disk_snapshot', 'disk_snapshots')
2218        if obj.instance_type is not None:
2219            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
2220        if obj.openstack_volume_type is not None:
2221            OpenStackVolumeTypeWriter.write_one(obj.openstack_volume_type, writer, 'openstack_volume_type')
2222        if obj.parent is not None:
2223            DiskSnapshotWriter.write_one(obj.parent, writer, 'parent')
2224        if obj.permissions is not None:
2225            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
2226        if obj.quota is not None:
2227            QuotaWriter.write_one(obj.quota, writer, 'quota')
2228        if obj.snapshot is not None:
2229            SnapshotWriter.write_one(obj.snapshot, writer, 'snapshot')
2230        if obj.statistics is not None:
2231            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
2232        if obj.storage_domain is not None:
2233            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
2234        if obj.storage_domains is not None:
2235            StorageDomainWriter.write_many(obj.storage_domains, writer, 'storage_domain', 'storage_domains')
2236        if obj.template is not None:
2237            TemplateWriter.write_one(obj.template, writer, 'template')
2238        if obj.vm is not None:
2239            VmWriter.write_one(obj.vm, writer, 'vm')
2240        if obj.vms is not None:
2241            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
2242        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2244    @staticmethod
2245    def write_many(objs, writer, singular=None, plural=None):
2246        if singular is None:
2247            singular = 'disk_snapshot'
2248        if plural is None:
2249            plural = 'disk_snapshots'
2250        writer.write_start(plural)
2251        if type(objs) == List:
2252            href = objs.href
2253            if href is not None:
2254                writer.write_attribute('href', href)
2255        for obj in objs:
2256            DiskSnapshotWriter.write_one(obj, writer, singular)
2257        writer.write_end()
class DisplayWriter(ovirtsdk4.writer.Writer):
2260class DisplayWriter(Writer):
2261
2262    def __init__(self):
2263        super(DisplayWriter, self).__init__()
2264
2265    @staticmethod
2266    def write_one(obj, writer, singular=None):
2267        if singular is None:
2268            singular = 'display'
2269        writer.write_start(singular)
2270        href = obj.href
2271        if href is not None:
2272            writer.write_attribute('href', href)
2273        if obj.address is not None:
2274            Writer.write_string(writer, 'address', obj.address)
2275        if obj.allow_override is not None:
2276            Writer.write_boolean(writer, 'allow_override', obj.allow_override)
2277        if obj.certificate is not None:
2278            CertificateWriter.write_one(obj.certificate, writer, 'certificate')
2279        if obj.copy_paste_enabled is not None:
2280            Writer.write_boolean(writer, 'copy_paste_enabled', obj.copy_paste_enabled)
2281        if obj.disconnect_action is not None:
2282            Writer.write_string(writer, 'disconnect_action', obj.disconnect_action)
2283        if obj.disconnect_action_delay is not None:
2284            Writer.write_integer(writer, 'disconnect_action_delay', obj.disconnect_action_delay)
2285        if obj.file_transfer_enabled is not None:
2286            Writer.write_boolean(writer, 'file_transfer_enabled', obj.file_transfer_enabled)
2287        if obj.keyboard_layout is not None:
2288            Writer.write_string(writer, 'keyboard_layout', obj.keyboard_layout)
2289        if obj.monitors is not None:
2290            Writer.write_integer(writer, 'monitors', obj.monitors)
2291        if obj.port is not None:
2292            Writer.write_integer(writer, 'port', obj.port)
2293        if obj.proxy is not None:
2294            Writer.write_string(writer, 'proxy', obj.proxy)
2295        if obj.secure_port is not None:
2296            Writer.write_integer(writer, 'secure_port', obj.secure_port)
2297        if obj.single_qxl_pci is not None:
2298            Writer.write_boolean(writer, 'single_qxl_pci', obj.single_qxl_pci)
2299        if obj.smartcard_enabled is not None:
2300            Writer.write_boolean(writer, 'smartcard_enabled', obj.smartcard_enabled)
2301        if obj.type is not None:
2302            Writer.write_string(writer, 'type', obj.type.value)
2303        writer.write_end()
2304
2305    @staticmethod
2306    def write_many(objs, writer, singular=None, plural=None):
2307        if singular is None:
2308            singular = 'display'
2309        if plural is None:
2310            plural = 'displays'
2311        writer.write_start(plural)
2312        if type(objs) == List:
2313            href = objs.href
2314            if href is not None:
2315                writer.write_attribute('href', href)
2316        for obj in objs:
2317            DisplayWriter.write_one(obj, writer, singular)
2318        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

DisplayWriter()
2262    def __init__(self):
2263        super(DisplayWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2265    @staticmethod
2266    def write_one(obj, writer, singular=None):
2267        if singular is None:
2268            singular = 'display'
2269        writer.write_start(singular)
2270        href = obj.href
2271        if href is not None:
2272            writer.write_attribute('href', href)
2273        if obj.address is not None:
2274            Writer.write_string(writer, 'address', obj.address)
2275        if obj.allow_override is not None:
2276            Writer.write_boolean(writer, 'allow_override', obj.allow_override)
2277        if obj.certificate is not None:
2278            CertificateWriter.write_one(obj.certificate, writer, 'certificate')
2279        if obj.copy_paste_enabled is not None:
2280            Writer.write_boolean(writer, 'copy_paste_enabled', obj.copy_paste_enabled)
2281        if obj.disconnect_action is not None:
2282            Writer.write_string(writer, 'disconnect_action', obj.disconnect_action)
2283        if obj.disconnect_action_delay is not None:
2284            Writer.write_integer(writer, 'disconnect_action_delay', obj.disconnect_action_delay)
2285        if obj.file_transfer_enabled is not None:
2286            Writer.write_boolean(writer, 'file_transfer_enabled', obj.file_transfer_enabled)
2287        if obj.keyboard_layout is not None:
2288            Writer.write_string(writer, 'keyboard_layout', obj.keyboard_layout)
2289        if obj.monitors is not None:
2290            Writer.write_integer(writer, 'monitors', obj.monitors)
2291        if obj.port is not None:
2292            Writer.write_integer(writer, 'port', obj.port)
2293        if obj.proxy is not None:
2294            Writer.write_string(writer, 'proxy', obj.proxy)
2295        if obj.secure_port is not None:
2296            Writer.write_integer(writer, 'secure_port', obj.secure_port)
2297        if obj.single_qxl_pci is not None:
2298            Writer.write_boolean(writer, 'single_qxl_pci', obj.single_qxl_pci)
2299        if obj.smartcard_enabled is not None:
2300            Writer.write_boolean(writer, 'smartcard_enabled', obj.smartcard_enabled)
2301        if obj.type is not None:
2302            Writer.write_string(writer, 'type', obj.type.value)
2303        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2305    @staticmethod
2306    def write_many(objs, writer, singular=None, plural=None):
2307        if singular is None:
2308            singular = 'display'
2309        if plural is None:
2310            plural = 'displays'
2311        writer.write_start(plural)
2312        if type(objs) == List:
2313            href = objs.href
2314            if href is not None:
2315                writer.write_attribute('href', href)
2316        for obj in objs:
2317            DisplayWriter.write_one(obj, writer, singular)
2318        writer.write_end()
class DnsWriter(ovirtsdk4.writer.Writer):
2321class DnsWriter(Writer):
2322
2323    def __init__(self):
2324        super(DnsWriter, self).__init__()
2325
2326    @staticmethod
2327    def write_one(obj, writer, singular=None):
2328        if singular is None:
2329            singular = 'dns'
2330        writer.write_start(singular)
2331        href = obj.href
2332        if href is not None:
2333            writer.write_attribute('href', href)
2334        if obj.search_domains is not None:
2335            HostWriter.write_many(obj.search_domains, writer, 'host', 'search_domains')
2336        if obj.servers is not None:
2337            HostWriter.write_many(obj.servers, writer, 'host', 'servers')
2338        writer.write_end()
2339
2340    @staticmethod
2341    def write_many(objs, writer, singular=None, plural=None):
2342        if singular is None:
2343            singular = 'dns'
2344        if plural is None:
2345            plural = 'dnss'
2346        writer.write_start(plural)
2347        if type(objs) == List:
2348            href = objs.href
2349            if href is not None:
2350                writer.write_attribute('href', href)
2351        for obj in objs:
2352            DnsWriter.write_one(obj, writer, singular)
2353        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

DnsWriter()
2323    def __init__(self):
2324        super(DnsWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2326    @staticmethod
2327    def write_one(obj, writer, singular=None):
2328        if singular is None:
2329            singular = 'dns'
2330        writer.write_start(singular)
2331        href = obj.href
2332        if href is not None:
2333            writer.write_attribute('href', href)
2334        if obj.search_domains is not None:
2335            HostWriter.write_many(obj.search_domains, writer, 'host', 'search_domains')
2336        if obj.servers is not None:
2337            HostWriter.write_many(obj.servers, writer, 'host', 'servers')
2338        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2340    @staticmethod
2341    def write_many(objs, writer, singular=None, plural=None):
2342        if singular is None:
2343            singular = 'dns'
2344        if plural is None:
2345            plural = 'dnss'
2346        writer.write_start(plural)
2347        if type(objs) == List:
2348            href = objs.href
2349            if href is not None:
2350                writer.write_attribute('href', href)
2351        for obj in objs:
2352            DnsWriter.write_one(obj, writer, singular)
2353        writer.write_end()
class DnsResolverConfigurationWriter(ovirtsdk4.writer.Writer):
2356class DnsResolverConfigurationWriter(Writer):
2357
2358    def __init__(self):
2359        super(DnsResolverConfigurationWriter, self).__init__()
2360
2361    @staticmethod
2362    def write_one(obj, writer, singular=None):
2363        if singular is None:
2364            singular = 'dns_resolver_configuration'
2365        writer.write_start(singular)
2366        href = obj.href
2367        if href is not None:
2368            writer.write_attribute('href', href)
2369        if obj.name_servers is not None:
2370            writer.write_start('name_servers')
2371            for item in obj.name_servers:
2372                if item is not None:
2373                    Writer.write_string(writer, 'name_server', item)
2374            writer.write_end()
2375        writer.write_end()
2376
2377    @staticmethod
2378    def write_many(objs, writer, singular=None, plural=None):
2379        if singular is None:
2380            singular = 'dns_resolver_configuration'
2381        if plural is None:
2382            plural = 'dns_resolver_configurations'
2383        writer.write_start(plural)
2384        if type(objs) == List:
2385            href = objs.href
2386            if href is not None:
2387                writer.write_attribute('href', href)
2388        for obj in objs:
2389            DnsResolverConfigurationWriter.write_one(obj, writer, singular)
2390        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

DnsResolverConfigurationWriter()
2358    def __init__(self):
2359        super(DnsResolverConfigurationWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2361    @staticmethod
2362    def write_one(obj, writer, singular=None):
2363        if singular is None:
2364            singular = 'dns_resolver_configuration'
2365        writer.write_start(singular)
2366        href = obj.href
2367        if href is not None:
2368            writer.write_attribute('href', href)
2369        if obj.name_servers is not None:
2370            writer.write_start('name_servers')
2371            for item in obj.name_servers:
2372                if item is not None:
2373                    Writer.write_string(writer, 'name_server', item)
2374            writer.write_end()
2375        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2377    @staticmethod
2378    def write_many(objs, writer, singular=None, plural=None):
2379        if singular is None:
2380            singular = 'dns_resolver_configuration'
2381        if plural is None:
2382            plural = 'dns_resolver_configurations'
2383        writer.write_start(plural)
2384        if type(objs) == List:
2385            href = objs.href
2386            if href is not None:
2387                writer.write_attribute('href', href)
2388        for obj in objs:
2389            DnsResolverConfigurationWriter.write_one(obj, writer, singular)
2390        writer.write_end()
class DomainWriter(ovirtsdk4.writer.Writer):
2393class DomainWriter(Writer):
2394
2395    def __init__(self):
2396        super(DomainWriter, self).__init__()
2397
2398    @staticmethod
2399    def write_one(obj, writer, singular=None):
2400        if singular is None:
2401            singular = 'domain'
2402        writer.write_start(singular)
2403        href = obj.href
2404        if href is not None:
2405            writer.write_attribute('href', href)
2406        if obj.id is not None:
2407            writer.write_attribute('id', obj.id)
2408        if obj.comment is not None:
2409            Writer.write_string(writer, 'comment', obj.comment)
2410        if obj.description is not None:
2411            Writer.write_string(writer, 'description', obj.description)
2412        if obj.name is not None:
2413            Writer.write_string(writer, 'name', obj.name)
2414        if obj.user is not None:
2415            UserWriter.write_one(obj.user, writer, 'user')
2416        if obj.groups is not None:
2417            GroupWriter.write_many(obj.groups, writer, 'group', 'groups')
2418        if obj.users is not None:
2419            UserWriter.write_many(obj.users, writer, 'user', 'users')
2420        writer.write_end()
2421
2422    @staticmethod
2423    def write_many(objs, writer, singular=None, plural=None):
2424        if singular is None:
2425            singular = 'domain'
2426        if plural is None:
2427            plural = 'domains'
2428        writer.write_start(plural)
2429        if type(objs) == List:
2430            href = objs.href
2431            if href is not None:
2432                writer.write_attribute('href', href)
2433        for obj in objs:
2434            DomainWriter.write_one(obj, writer, singular)
2435        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

DomainWriter()
2395    def __init__(self):
2396        super(DomainWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2398    @staticmethod
2399    def write_one(obj, writer, singular=None):
2400        if singular is None:
2401            singular = 'domain'
2402        writer.write_start(singular)
2403        href = obj.href
2404        if href is not None:
2405            writer.write_attribute('href', href)
2406        if obj.id is not None:
2407            writer.write_attribute('id', obj.id)
2408        if obj.comment is not None:
2409            Writer.write_string(writer, 'comment', obj.comment)
2410        if obj.description is not None:
2411            Writer.write_string(writer, 'description', obj.description)
2412        if obj.name is not None:
2413            Writer.write_string(writer, 'name', obj.name)
2414        if obj.user is not None:
2415            UserWriter.write_one(obj.user, writer, 'user')
2416        if obj.groups is not None:
2417            GroupWriter.write_many(obj.groups, writer, 'group', 'groups')
2418        if obj.users is not None:
2419            UserWriter.write_many(obj.users, writer, 'user', 'users')
2420        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2422    @staticmethod
2423    def write_many(objs, writer, singular=None, plural=None):
2424        if singular is None:
2425            singular = 'domain'
2426        if plural is None:
2427            plural = 'domains'
2428        writer.write_start(plural)
2429        if type(objs) == List:
2430            href = objs.href
2431            if href is not None:
2432                writer.write_attribute('href', href)
2433        for obj in objs:
2434            DomainWriter.write_one(obj, writer, singular)
2435        writer.write_end()
class DynamicCpuWriter(ovirtsdk4.writer.Writer):
2438class DynamicCpuWriter(Writer):
2439
2440    def __init__(self):
2441        super(DynamicCpuWriter, self).__init__()
2442
2443    @staticmethod
2444    def write_one(obj, writer, singular=None):
2445        if singular is None:
2446            singular = 'dynamic_cpu'
2447        writer.write_start(singular)
2448        href = obj.href
2449        if href is not None:
2450            writer.write_attribute('href', href)
2451        if obj.cpu_tune is not None:
2452            CpuTuneWriter.write_one(obj.cpu_tune, writer, 'cpu_tune')
2453        if obj.topology is not None:
2454            CpuTopologyWriter.write_one(obj.topology, writer, 'topology')
2455        writer.write_end()
2456
2457    @staticmethod
2458    def write_many(objs, writer, singular=None, plural=None):
2459        if singular is None:
2460            singular = 'dynamic_cpu'
2461        if plural is None:
2462            plural = 'dynamic_cpus'
2463        writer.write_start(plural)
2464        if type(objs) == List:
2465            href = objs.href
2466            if href is not None:
2467                writer.write_attribute('href', href)
2468        for obj in objs:
2469            DynamicCpuWriter.write_one(obj, writer, singular)
2470        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

DynamicCpuWriter()
2440    def __init__(self):
2441        super(DynamicCpuWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2443    @staticmethod
2444    def write_one(obj, writer, singular=None):
2445        if singular is None:
2446            singular = 'dynamic_cpu'
2447        writer.write_start(singular)
2448        href = obj.href
2449        if href is not None:
2450            writer.write_attribute('href', href)
2451        if obj.cpu_tune is not None:
2452            CpuTuneWriter.write_one(obj.cpu_tune, writer, 'cpu_tune')
2453        if obj.topology is not None:
2454            CpuTopologyWriter.write_one(obj.topology, writer, 'topology')
2455        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2457    @staticmethod
2458    def write_many(objs, writer, singular=None, plural=None):
2459        if singular is None:
2460            singular = 'dynamic_cpu'
2461        if plural is None:
2462            plural = 'dynamic_cpus'
2463        writer.write_start(plural)
2464        if type(objs) == List:
2465            href = objs.href
2466            if href is not None:
2467                writer.write_attribute('href', href)
2468        for obj in objs:
2469            DynamicCpuWriter.write_one(obj, writer, singular)
2470        writer.write_end()
class EntityProfileDetailWriter(ovirtsdk4.writer.Writer):
2473class EntityProfileDetailWriter(Writer):
2474
2475    def __init__(self):
2476        super(EntityProfileDetailWriter, self).__init__()
2477
2478    @staticmethod
2479    def write_one(obj, writer, singular=None):
2480        if singular is None:
2481            singular = 'entity_profile_detail'
2482        writer.write_start(singular)
2483        href = obj.href
2484        if href is not None:
2485            writer.write_attribute('href', href)
2486        if obj.profile_details is not None:
2487            ProfileDetailWriter.write_many(obj.profile_details, writer, 'profile_detail', 'profile_details')
2488        writer.write_end()
2489
2490    @staticmethod
2491    def write_many(objs, writer, singular=None, plural=None):
2492        if singular is None:
2493            singular = 'entity_profile_detail'
2494        if plural is None:
2495            plural = 'entity_profile_details'
2496        writer.write_start(plural)
2497        if type(objs) == List:
2498            href = objs.href
2499            if href is not None:
2500                writer.write_attribute('href', href)
2501        for obj in objs:
2502            EntityProfileDetailWriter.write_one(obj, writer, singular)
2503        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

EntityProfileDetailWriter()
2475    def __init__(self):
2476        super(EntityProfileDetailWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2478    @staticmethod
2479    def write_one(obj, writer, singular=None):
2480        if singular is None:
2481            singular = 'entity_profile_detail'
2482        writer.write_start(singular)
2483        href = obj.href
2484        if href is not None:
2485            writer.write_attribute('href', href)
2486        if obj.profile_details is not None:
2487            ProfileDetailWriter.write_many(obj.profile_details, writer, 'profile_detail', 'profile_details')
2488        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2490    @staticmethod
2491    def write_many(objs, writer, singular=None, plural=None):
2492        if singular is None:
2493            singular = 'entity_profile_detail'
2494        if plural is None:
2495            plural = 'entity_profile_details'
2496        writer.write_start(plural)
2497        if type(objs) == List:
2498            href = objs.href
2499            if href is not None:
2500                writer.write_attribute('href', href)
2501        for obj in objs:
2502            EntityProfileDetailWriter.write_one(obj, writer, singular)
2503        writer.write_end()
class ErrorHandlingWriter(ovirtsdk4.writer.Writer):
2506class ErrorHandlingWriter(Writer):
2507
2508    def __init__(self):
2509        super(ErrorHandlingWriter, self).__init__()
2510
2511    @staticmethod
2512    def write_one(obj, writer, singular=None):
2513        if singular is None:
2514            singular = 'error_handling'
2515        writer.write_start(singular)
2516        href = obj.href
2517        if href is not None:
2518            writer.write_attribute('href', href)
2519        if obj.on_error is not None:
2520            Writer.write_string(writer, 'on_error', obj.on_error.value)
2521        writer.write_end()
2522
2523    @staticmethod
2524    def write_many(objs, writer, singular=None, plural=None):
2525        if singular is None:
2526            singular = 'error_handling'
2527        if plural is None:
2528            plural = 'error_handlings'
2529        writer.write_start(plural)
2530        if type(objs) == List:
2531            href = objs.href
2532            if href is not None:
2533                writer.write_attribute('href', href)
2534        for obj in objs:
2535            ErrorHandlingWriter.write_one(obj, writer, singular)
2536        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ErrorHandlingWriter()
2508    def __init__(self):
2509        super(ErrorHandlingWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2511    @staticmethod
2512    def write_one(obj, writer, singular=None):
2513        if singular is None:
2514            singular = 'error_handling'
2515        writer.write_start(singular)
2516        href = obj.href
2517        if href is not None:
2518            writer.write_attribute('href', href)
2519        if obj.on_error is not None:
2520            Writer.write_string(writer, 'on_error', obj.on_error.value)
2521        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2523    @staticmethod
2524    def write_many(objs, writer, singular=None, plural=None):
2525        if singular is None:
2526            singular = 'error_handling'
2527        if plural is None:
2528            plural = 'error_handlings'
2529        writer.write_start(plural)
2530        if type(objs) == List:
2531            href = objs.href
2532            if href is not None:
2533                writer.write_attribute('href', href)
2534        for obj in objs:
2535            ErrorHandlingWriter.write_one(obj, writer, singular)
2536        writer.write_end()
class EventWriter(ovirtsdk4.writer.Writer):
2539class EventWriter(Writer):
2540
2541    def __init__(self):
2542        super(EventWriter, self).__init__()
2543
2544    @staticmethod
2545    def write_one(obj, writer, singular=None):
2546        if singular is None:
2547            singular = 'event'
2548        writer.write_start(singular)
2549        href = obj.href
2550        if href is not None:
2551            writer.write_attribute('href', href)
2552        if obj.id is not None:
2553            writer.write_attribute('id', obj.id)
2554        if obj.code is not None:
2555            Writer.write_integer(writer, 'code', obj.code)
2556        if obj.comment is not None:
2557            Writer.write_string(writer, 'comment', obj.comment)
2558        if obj.correlation_id is not None:
2559            Writer.write_string(writer, 'correlation_id', obj.correlation_id)
2560        if obj.custom_data is not None:
2561            Writer.write_string(writer, 'custom_data', obj.custom_data)
2562        if obj.custom_id is not None:
2563            Writer.write_integer(writer, 'custom_id', obj.custom_id)
2564        if obj.description is not None:
2565            Writer.write_string(writer, 'description', obj.description)
2566        if obj.flood_rate is not None:
2567            Writer.write_integer(writer, 'flood_rate', obj.flood_rate)
2568        if obj.index is not None:
2569            Writer.write_integer(writer, 'index', obj.index)
2570        if obj.log_on_host is not None:
2571            Writer.write_boolean(writer, 'log_on_host', obj.log_on_host)
2572        if obj.name is not None:
2573            Writer.write_string(writer, 'name', obj.name)
2574        if obj.origin is not None:
2575            Writer.write_string(writer, 'origin', obj.origin)
2576        if obj.severity is not None:
2577            Writer.write_string(writer, 'severity', obj.severity.value)
2578        if obj.time is not None:
2579            Writer.write_date(writer, 'time', obj.time)
2580        if obj.cluster is not None:
2581            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
2582        if obj.data_center is not None:
2583            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
2584        if obj.host is not None:
2585            HostWriter.write_one(obj.host, writer, 'host')
2586        if obj.storage_domain is not None:
2587            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
2588        if obj.template is not None:
2589            TemplateWriter.write_one(obj.template, writer, 'template')
2590        if obj.user is not None:
2591            UserWriter.write_one(obj.user, writer, 'user')
2592        if obj.vm is not None:
2593            VmWriter.write_one(obj.vm, writer, 'vm')
2594        writer.write_end()
2595
2596    @staticmethod
2597    def write_many(objs, writer, singular=None, plural=None):
2598        if singular is None:
2599            singular = 'event'
2600        if plural is None:
2601            plural = 'events'
2602        writer.write_start(plural)
2603        if type(objs) == List:
2604            href = objs.href
2605            if href is not None:
2606                writer.write_attribute('href', href)
2607        for obj in objs:
2608            EventWriter.write_one(obj, writer, singular)
2609        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

EventWriter()
2541    def __init__(self):
2542        super(EventWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2544    @staticmethod
2545    def write_one(obj, writer, singular=None):
2546        if singular is None:
2547            singular = 'event'
2548        writer.write_start(singular)
2549        href = obj.href
2550        if href is not None:
2551            writer.write_attribute('href', href)
2552        if obj.id is not None:
2553            writer.write_attribute('id', obj.id)
2554        if obj.code is not None:
2555            Writer.write_integer(writer, 'code', obj.code)
2556        if obj.comment is not None:
2557            Writer.write_string(writer, 'comment', obj.comment)
2558        if obj.correlation_id is not None:
2559            Writer.write_string(writer, 'correlation_id', obj.correlation_id)
2560        if obj.custom_data is not None:
2561            Writer.write_string(writer, 'custom_data', obj.custom_data)
2562        if obj.custom_id is not None:
2563            Writer.write_integer(writer, 'custom_id', obj.custom_id)
2564        if obj.description is not None:
2565            Writer.write_string(writer, 'description', obj.description)
2566        if obj.flood_rate is not None:
2567            Writer.write_integer(writer, 'flood_rate', obj.flood_rate)
2568        if obj.index is not None:
2569            Writer.write_integer(writer, 'index', obj.index)
2570        if obj.log_on_host is not None:
2571            Writer.write_boolean(writer, 'log_on_host', obj.log_on_host)
2572        if obj.name is not None:
2573            Writer.write_string(writer, 'name', obj.name)
2574        if obj.origin is not None:
2575            Writer.write_string(writer, 'origin', obj.origin)
2576        if obj.severity is not None:
2577            Writer.write_string(writer, 'severity', obj.severity.value)
2578        if obj.time is not None:
2579            Writer.write_date(writer, 'time', obj.time)
2580        if obj.cluster is not None:
2581            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
2582        if obj.data_center is not None:
2583            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
2584        if obj.host is not None:
2585            HostWriter.write_one(obj.host, writer, 'host')
2586        if obj.storage_domain is not None:
2587            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
2588        if obj.template is not None:
2589            TemplateWriter.write_one(obj.template, writer, 'template')
2590        if obj.user is not None:
2591            UserWriter.write_one(obj.user, writer, 'user')
2592        if obj.vm is not None:
2593            VmWriter.write_one(obj.vm, writer, 'vm')
2594        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2596    @staticmethod
2597    def write_many(objs, writer, singular=None, plural=None):
2598        if singular is None:
2599            singular = 'event'
2600        if plural is None:
2601            plural = 'events'
2602        writer.write_start(plural)
2603        if type(objs) == List:
2604            href = objs.href
2605            if href is not None:
2606                writer.write_attribute('href', href)
2607        for obj in objs:
2608            EventWriter.write_one(obj, writer, singular)
2609        writer.write_end()
class EventSubscriptionWriter(ovirtsdk4.writer.Writer):
2612class EventSubscriptionWriter(Writer):
2613
2614    def __init__(self):
2615        super(EventSubscriptionWriter, self).__init__()
2616
2617    @staticmethod
2618    def write_one(obj, writer, singular=None):
2619        if singular is None:
2620            singular = 'event_subscription'
2621        writer.write_start(singular)
2622        href = obj.href
2623        if href is not None:
2624            writer.write_attribute('href', href)
2625        if obj.id is not None:
2626            writer.write_attribute('id', obj.id)
2627        if obj.address is not None:
2628            Writer.write_string(writer, 'address', obj.address)
2629        if obj.comment is not None:
2630            Writer.write_string(writer, 'comment', obj.comment)
2631        if obj.description is not None:
2632            Writer.write_string(writer, 'description', obj.description)
2633        if obj.event is not None:
2634            Writer.write_string(writer, 'event', obj.event.value)
2635        if obj.name is not None:
2636            Writer.write_string(writer, 'name', obj.name)
2637        if obj.notification_method is not None:
2638            Writer.write_string(writer, 'notification_method', obj.notification_method.value)
2639        if obj.user is not None:
2640            UserWriter.write_one(obj.user, writer, 'user')
2641        writer.write_end()
2642
2643    @staticmethod
2644    def write_many(objs, writer, singular=None, plural=None):
2645        if singular is None:
2646            singular = 'event_subscription'
2647        if plural is None:
2648            plural = 'event_subscriptions'
2649        writer.write_start(plural)
2650        if type(objs) == List:
2651            href = objs.href
2652            if href is not None:
2653                writer.write_attribute('href', href)
2654        for obj in objs:
2655            EventSubscriptionWriter.write_one(obj, writer, singular)
2656        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

EventSubscriptionWriter()
2614    def __init__(self):
2615        super(EventSubscriptionWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2617    @staticmethod
2618    def write_one(obj, writer, singular=None):
2619        if singular is None:
2620            singular = 'event_subscription'
2621        writer.write_start(singular)
2622        href = obj.href
2623        if href is not None:
2624            writer.write_attribute('href', href)
2625        if obj.id is not None:
2626            writer.write_attribute('id', obj.id)
2627        if obj.address is not None:
2628            Writer.write_string(writer, 'address', obj.address)
2629        if obj.comment is not None:
2630            Writer.write_string(writer, 'comment', obj.comment)
2631        if obj.description is not None:
2632            Writer.write_string(writer, 'description', obj.description)
2633        if obj.event is not None:
2634            Writer.write_string(writer, 'event', obj.event.value)
2635        if obj.name is not None:
2636            Writer.write_string(writer, 'name', obj.name)
2637        if obj.notification_method is not None:
2638            Writer.write_string(writer, 'notification_method', obj.notification_method.value)
2639        if obj.user is not None:
2640            UserWriter.write_one(obj.user, writer, 'user')
2641        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2643    @staticmethod
2644    def write_many(objs, writer, singular=None, plural=None):
2645        if singular is None:
2646            singular = 'event_subscription'
2647        if plural is None:
2648            plural = 'event_subscriptions'
2649        writer.write_start(plural)
2650        if type(objs) == List:
2651            href = objs.href
2652            if href is not None:
2653                writer.write_attribute('href', href)
2654        for obj in objs:
2655            EventSubscriptionWriter.write_one(obj, writer, singular)
2656        writer.write_end()
class ExternalComputeResourceWriter(ovirtsdk4.writer.Writer):
2659class ExternalComputeResourceWriter(Writer):
2660
2661    def __init__(self):
2662        super(ExternalComputeResourceWriter, self).__init__()
2663
2664    @staticmethod
2665    def write_one(obj, writer, singular=None):
2666        if singular is None:
2667            singular = 'external_compute_resource'
2668        writer.write_start(singular)
2669        href = obj.href
2670        if href is not None:
2671            writer.write_attribute('href', href)
2672        if obj.id is not None:
2673            writer.write_attribute('id', obj.id)
2674        if obj.comment is not None:
2675            Writer.write_string(writer, 'comment', obj.comment)
2676        if obj.description is not None:
2677            Writer.write_string(writer, 'description', obj.description)
2678        if obj.name is not None:
2679            Writer.write_string(writer, 'name', obj.name)
2680        if obj.provider is not None:
2681            Writer.write_string(writer, 'provider', obj.provider)
2682        if obj.url is not None:
2683            Writer.write_string(writer, 'url', obj.url)
2684        if obj.user is not None:
2685            Writer.write_string(writer, 'user', obj.user)
2686        if obj.external_host_provider is not None:
2687            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
2688        writer.write_end()
2689
2690    @staticmethod
2691    def write_many(objs, writer, singular=None, plural=None):
2692        if singular is None:
2693            singular = 'external_compute_resource'
2694        if plural is None:
2695            plural = 'external_compute_resources'
2696        writer.write_start(plural)
2697        if type(objs) == List:
2698            href = objs.href
2699            if href is not None:
2700                writer.write_attribute('href', href)
2701        for obj in objs:
2702            ExternalComputeResourceWriter.write_one(obj, writer, singular)
2703        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ExternalComputeResourceWriter()
2661    def __init__(self):
2662        super(ExternalComputeResourceWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2664    @staticmethod
2665    def write_one(obj, writer, singular=None):
2666        if singular is None:
2667            singular = 'external_compute_resource'
2668        writer.write_start(singular)
2669        href = obj.href
2670        if href is not None:
2671            writer.write_attribute('href', href)
2672        if obj.id is not None:
2673            writer.write_attribute('id', obj.id)
2674        if obj.comment is not None:
2675            Writer.write_string(writer, 'comment', obj.comment)
2676        if obj.description is not None:
2677            Writer.write_string(writer, 'description', obj.description)
2678        if obj.name is not None:
2679            Writer.write_string(writer, 'name', obj.name)
2680        if obj.provider is not None:
2681            Writer.write_string(writer, 'provider', obj.provider)
2682        if obj.url is not None:
2683            Writer.write_string(writer, 'url', obj.url)
2684        if obj.user is not None:
2685            Writer.write_string(writer, 'user', obj.user)
2686        if obj.external_host_provider is not None:
2687            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
2688        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2690    @staticmethod
2691    def write_many(objs, writer, singular=None, plural=None):
2692        if singular is None:
2693            singular = 'external_compute_resource'
2694        if plural is None:
2695            plural = 'external_compute_resources'
2696        writer.write_start(plural)
2697        if type(objs) == List:
2698            href = objs.href
2699            if href is not None:
2700                writer.write_attribute('href', href)
2701        for obj in objs:
2702            ExternalComputeResourceWriter.write_one(obj, writer, singular)
2703        writer.write_end()
class ExternalDiscoveredHostWriter(ovirtsdk4.writer.Writer):
2706class ExternalDiscoveredHostWriter(Writer):
2707
2708    def __init__(self):
2709        super(ExternalDiscoveredHostWriter, self).__init__()
2710
2711    @staticmethod
2712    def write_one(obj, writer, singular=None):
2713        if singular is None:
2714            singular = 'external_discovered_host'
2715        writer.write_start(singular)
2716        href = obj.href
2717        if href is not None:
2718            writer.write_attribute('href', href)
2719        if obj.id is not None:
2720            writer.write_attribute('id', obj.id)
2721        if obj.comment is not None:
2722            Writer.write_string(writer, 'comment', obj.comment)
2723        if obj.description is not None:
2724            Writer.write_string(writer, 'description', obj.description)
2725        if obj.ip is not None:
2726            Writer.write_string(writer, 'ip', obj.ip)
2727        if obj.last_report is not None:
2728            Writer.write_string(writer, 'last_report', obj.last_report)
2729        if obj.mac is not None:
2730            Writer.write_string(writer, 'mac', obj.mac)
2731        if obj.name is not None:
2732            Writer.write_string(writer, 'name', obj.name)
2733        if obj.subnet_name is not None:
2734            Writer.write_string(writer, 'subnet_name', obj.subnet_name)
2735        if obj.external_host_provider is not None:
2736            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
2737        writer.write_end()
2738
2739    @staticmethod
2740    def write_many(objs, writer, singular=None, plural=None):
2741        if singular is None:
2742            singular = 'external_discovered_host'
2743        if plural is None:
2744            plural = 'external_discovered_hosts'
2745        writer.write_start(plural)
2746        if type(objs) == List:
2747            href = objs.href
2748            if href is not None:
2749                writer.write_attribute('href', href)
2750        for obj in objs:
2751            ExternalDiscoveredHostWriter.write_one(obj, writer, singular)
2752        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ExternalDiscoveredHostWriter()
2708    def __init__(self):
2709        super(ExternalDiscoveredHostWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2711    @staticmethod
2712    def write_one(obj, writer, singular=None):
2713        if singular is None:
2714            singular = 'external_discovered_host'
2715        writer.write_start(singular)
2716        href = obj.href
2717        if href is not None:
2718            writer.write_attribute('href', href)
2719        if obj.id is not None:
2720            writer.write_attribute('id', obj.id)
2721        if obj.comment is not None:
2722            Writer.write_string(writer, 'comment', obj.comment)
2723        if obj.description is not None:
2724            Writer.write_string(writer, 'description', obj.description)
2725        if obj.ip is not None:
2726            Writer.write_string(writer, 'ip', obj.ip)
2727        if obj.last_report is not None:
2728            Writer.write_string(writer, 'last_report', obj.last_report)
2729        if obj.mac is not None:
2730            Writer.write_string(writer, 'mac', obj.mac)
2731        if obj.name is not None:
2732            Writer.write_string(writer, 'name', obj.name)
2733        if obj.subnet_name is not None:
2734            Writer.write_string(writer, 'subnet_name', obj.subnet_name)
2735        if obj.external_host_provider is not None:
2736            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
2737        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2739    @staticmethod
2740    def write_many(objs, writer, singular=None, plural=None):
2741        if singular is None:
2742            singular = 'external_discovered_host'
2743        if plural is None:
2744            plural = 'external_discovered_hosts'
2745        writer.write_start(plural)
2746        if type(objs) == List:
2747            href = objs.href
2748            if href is not None:
2749                writer.write_attribute('href', href)
2750        for obj in objs:
2751            ExternalDiscoveredHostWriter.write_one(obj, writer, singular)
2752        writer.write_end()
class ExternalHostWriter(ovirtsdk4.writer.Writer):
2755class ExternalHostWriter(Writer):
2756
2757    def __init__(self):
2758        super(ExternalHostWriter, self).__init__()
2759
2760    @staticmethod
2761    def write_one(obj, writer, singular=None):
2762        if singular is None:
2763            singular = 'external_host'
2764        writer.write_start(singular)
2765        href = obj.href
2766        if href is not None:
2767            writer.write_attribute('href', href)
2768        if obj.id is not None:
2769            writer.write_attribute('id', obj.id)
2770        if obj.address is not None:
2771            Writer.write_string(writer, 'address', obj.address)
2772        if obj.comment is not None:
2773            Writer.write_string(writer, 'comment', obj.comment)
2774        if obj.description is not None:
2775            Writer.write_string(writer, 'description', obj.description)
2776        if obj.name is not None:
2777            Writer.write_string(writer, 'name', obj.name)
2778        if obj.external_host_provider is not None:
2779            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
2780        writer.write_end()
2781
2782    @staticmethod
2783    def write_many(objs, writer, singular=None, plural=None):
2784        if singular is None:
2785            singular = 'external_host'
2786        if plural is None:
2787            plural = 'external_hosts'
2788        writer.write_start(plural)
2789        if type(objs) == List:
2790            href = objs.href
2791            if href is not None:
2792                writer.write_attribute('href', href)
2793        for obj in objs:
2794            ExternalHostWriter.write_one(obj, writer, singular)
2795        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ExternalHostWriter()
2757    def __init__(self):
2758        super(ExternalHostWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2760    @staticmethod
2761    def write_one(obj, writer, singular=None):
2762        if singular is None:
2763            singular = 'external_host'
2764        writer.write_start(singular)
2765        href = obj.href
2766        if href is not None:
2767            writer.write_attribute('href', href)
2768        if obj.id is not None:
2769            writer.write_attribute('id', obj.id)
2770        if obj.address is not None:
2771            Writer.write_string(writer, 'address', obj.address)
2772        if obj.comment is not None:
2773            Writer.write_string(writer, 'comment', obj.comment)
2774        if obj.description is not None:
2775            Writer.write_string(writer, 'description', obj.description)
2776        if obj.name is not None:
2777            Writer.write_string(writer, 'name', obj.name)
2778        if obj.external_host_provider is not None:
2779            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
2780        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2782    @staticmethod
2783    def write_many(objs, writer, singular=None, plural=None):
2784        if singular is None:
2785            singular = 'external_host'
2786        if plural is None:
2787            plural = 'external_hosts'
2788        writer.write_start(plural)
2789        if type(objs) == List:
2790            href = objs.href
2791            if href is not None:
2792                writer.write_attribute('href', href)
2793        for obj in objs:
2794            ExternalHostWriter.write_one(obj, writer, singular)
2795        writer.write_end()
class ExternalHostGroupWriter(ovirtsdk4.writer.Writer):
2798class ExternalHostGroupWriter(Writer):
2799
2800    def __init__(self):
2801        super(ExternalHostGroupWriter, self).__init__()
2802
2803    @staticmethod
2804    def write_one(obj, writer, singular=None):
2805        if singular is None:
2806            singular = 'external_host_group'
2807        writer.write_start(singular)
2808        href = obj.href
2809        if href is not None:
2810            writer.write_attribute('href', href)
2811        if obj.id is not None:
2812            writer.write_attribute('id', obj.id)
2813        if obj.architecture_name is not None:
2814            Writer.write_string(writer, 'architecture_name', obj.architecture_name)
2815        if obj.comment is not None:
2816            Writer.write_string(writer, 'comment', obj.comment)
2817        if obj.description is not None:
2818            Writer.write_string(writer, 'description', obj.description)
2819        if obj.domain_name is not None:
2820            Writer.write_string(writer, 'domain_name', obj.domain_name)
2821        if obj.name is not None:
2822            Writer.write_string(writer, 'name', obj.name)
2823        if obj.operating_system_name is not None:
2824            Writer.write_string(writer, 'operating_system_name', obj.operating_system_name)
2825        if obj.subnet_name is not None:
2826            Writer.write_string(writer, 'subnet_name', obj.subnet_name)
2827        if obj.external_host_provider is not None:
2828            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
2829        writer.write_end()
2830
2831    @staticmethod
2832    def write_many(objs, writer, singular=None, plural=None):
2833        if singular is None:
2834            singular = 'external_host_group'
2835        if plural is None:
2836            plural = 'external_host_groups'
2837        writer.write_start(plural)
2838        if type(objs) == List:
2839            href = objs.href
2840            if href is not None:
2841                writer.write_attribute('href', href)
2842        for obj in objs:
2843            ExternalHostGroupWriter.write_one(obj, writer, singular)
2844        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ExternalHostGroupWriter()
2800    def __init__(self):
2801        super(ExternalHostGroupWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2803    @staticmethod
2804    def write_one(obj, writer, singular=None):
2805        if singular is None:
2806            singular = 'external_host_group'
2807        writer.write_start(singular)
2808        href = obj.href
2809        if href is not None:
2810            writer.write_attribute('href', href)
2811        if obj.id is not None:
2812            writer.write_attribute('id', obj.id)
2813        if obj.architecture_name is not None:
2814            Writer.write_string(writer, 'architecture_name', obj.architecture_name)
2815        if obj.comment is not None:
2816            Writer.write_string(writer, 'comment', obj.comment)
2817        if obj.description is not None:
2818            Writer.write_string(writer, 'description', obj.description)
2819        if obj.domain_name is not None:
2820            Writer.write_string(writer, 'domain_name', obj.domain_name)
2821        if obj.name is not None:
2822            Writer.write_string(writer, 'name', obj.name)
2823        if obj.operating_system_name is not None:
2824            Writer.write_string(writer, 'operating_system_name', obj.operating_system_name)
2825        if obj.subnet_name is not None:
2826            Writer.write_string(writer, 'subnet_name', obj.subnet_name)
2827        if obj.external_host_provider is not None:
2828            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
2829        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2831    @staticmethod
2832    def write_many(objs, writer, singular=None, plural=None):
2833        if singular is None:
2834            singular = 'external_host_group'
2835        if plural is None:
2836            plural = 'external_host_groups'
2837        writer.write_start(plural)
2838        if type(objs) == List:
2839            href = objs.href
2840            if href is not None:
2841                writer.write_attribute('href', href)
2842        for obj in objs:
2843            ExternalHostGroupWriter.write_one(obj, writer, singular)
2844        writer.write_end()
class ExternalHostProviderWriter(ovirtsdk4.writer.Writer):
2847class ExternalHostProviderWriter(Writer):
2848
2849    def __init__(self):
2850        super(ExternalHostProviderWriter, self).__init__()
2851
2852    @staticmethod
2853    def write_one(obj, writer, singular=None):
2854        if singular is None:
2855            singular = 'external_host_provider'
2856        writer.write_start(singular)
2857        href = obj.href
2858        if href is not None:
2859            writer.write_attribute('href', href)
2860        if obj.id is not None:
2861            writer.write_attribute('id', obj.id)
2862        if obj.authentication_url is not None:
2863            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
2864        if obj.comment is not None:
2865            Writer.write_string(writer, 'comment', obj.comment)
2866        if obj.description is not None:
2867            Writer.write_string(writer, 'description', obj.description)
2868        if obj.name is not None:
2869            Writer.write_string(writer, 'name', obj.name)
2870        if obj.password is not None:
2871            Writer.write_string(writer, 'password', obj.password)
2872        if obj.properties is not None:
2873            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
2874        if obj.requires_authentication is not None:
2875            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
2876        if obj.url is not None:
2877            Writer.write_string(writer, 'url', obj.url)
2878        if obj.username is not None:
2879            Writer.write_string(writer, 'username', obj.username)
2880        if obj.certificates is not None:
2881            CertificateWriter.write_many(obj.certificates, writer, 'certificate', 'certificates')
2882        if obj.compute_resources is not None:
2883            ExternalComputeResourceWriter.write_many(obj.compute_resources, writer, 'external_compute_resource', 'compute_resources')
2884        if obj.discovered_hosts is not None:
2885            ExternalDiscoveredHostWriter.write_many(obj.discovered_hosts, writer, 'external_discovered_host', 'discovered_hosts')
2886        if obj.host_groups is not None:
2887            ExternalHostGroupWriter.write_many(obj.host_groups, writer, 'external_host_group', 'host_groups')
2888        if obj.hosts is not None:
2889            HostWriter.write_many(obj.hosts, writer, 'host', 'hosts')
2890        writer.write_end()
2891
2892    @staticmethod
2893    def write_many(objs, writer, singular=None, plural=None):
2894        if singular is None:
2895            singular = 'external_host_provider'
2896        if plural is None:
2897            plural = 'external_host_providers'
2898        writer.write_start(plural)
2899        if type(objs) == List:
2900            href = objs.href
2901            if href is not None:
2902                writer.write_attribute('href', href)
2903        for obj in objs:
2904            ExternalHostProviderWriter.write_one(obj, writer, singular)
2905        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ExternalHostProviderWriter()
2849    def __init__(self):
2850        super(ExternalHostProviderWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2852    @staticmethod
2853    def write_one(obj, writer, singular=None):
2854        if singular is None:
2855            singular = 'external_host_provider'
2856        writer.write_start(singular)
2857        href = obj.href
2858        if href is not None:
2859            writer.write_attribute('href', href)
2860        if obj.id is not None:
2861            writer.write_attribute('id', obj.id)
2862        if obj.authentication_url is not None:
2863            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
2864        if obj.comment is not None:
2865            Writer.write_string(writer, 'comment', obj.comment)
2866        if obj.description is not None:
2867            Writer.write_string(writer, 'description', obj.description)
2868        if obj.name is not None:
2869            Writer.write_string(writer, 'name', obj.name)
2870        if obj.password is not None:
2871            Writer.write_string(writer, 'password', obj.password)
2872        if obj.properties is not None:
2873            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
2874        if obj.requires_authentication is not None:
2875            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
2876        if obj.url is not None:
2877            Writer.write_string(writer, 'url', obj.url)
2878        if obj.username is not None:
2879            Writer.write_string(writer, 'username', obj.username)
2880        if obj.certificates is not None:
2881            CertificateWriter.write_many(obj.certificates, writer, 'certificate', 'certificates')
2882        if obj.compute_resources is not None:
2883            ExternalComputeResourceWriter.write_many(obj.compute_resources, writer, 'external_compute_resource', 'compute_resources')
2884        if obj.discovered_hosts is not None:
2885            ExternalDiscoveredHostWriter.write_many(obj.discovered_hosts, writer, 'external_discovered_host', 'discovered_hosts')
2886        if obj.host_groups is not None:
2887            ExternalHostGroupWriter.write_many(obj.host_groups, writer, 'external_host_group', 'host_groups')
2888        if obj.hosts is not None:
2889            HostWriter.write_many(obj.hosts, writer, 'host', 'hosts')
2890        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2892    @staticmethod
2893    def write_many(objs, writer, singular=None, plural=None):
2894        if singular is None:
2895            singular = 'external_host_provider'
2896        if plural is None:
2897            plural = 'external_host_providers'
2898        writer.write_start(plural)
2899        if type(objs) == List:
2900            href = objs.href
2901            if href is not None:
2902                writer.write_attribute('href', href)
2903        for obj in objs:
2904            ExternalHostProviderWriter.write_one(obj, writer, singular)
2905        writer.write_end()
class ExternalNetworkProviderConfigurationWriter(ovirtsdk4.writer.Writer):
2908class ExternalNetworkProviderConfigurationWriter(Writer):
2909
2910    def __init__(self):
2911        super(ExternalNetworkProviderConfigurationWriter, self).__init__()
2912
2913    @staticmethod
2914    def write_one(obj, writer, singular=None):
2915        if singular is None:
2916            singular = 'external_network_provider_configuration'
2917        writer.write_start(singular)
2918        href = obj.href
2919        if href is not None:
2920            writer.write_attribute('href', href)
2921        if obj.id is not None:
2922            writer.write_attribute('id', obj.id)
2923        if obj.comment is not None:
2924            Writer.write_string(writer, 'comment', obj.comment)
2925        if obj.description is not None:
2926            Writer.write_string(writer, 'description', obj.description)
2927        if obj.name is not None:
2928            Writer.write_string(writer, 'name', obj.name)
2929        if obj.external_network_provider is not None:
2930            ExternalProviderWriter.write_one(obj.external_network_provider, writer, 'external_network_provider')
2931        if obj.host is not None:
2932            HostWriter.write_one(obj.host, writer, 'host')
2933        writer.write_end()
2934
2935    @staticmethod
2936    def write_many(objs, writer, singular=None, plural=None):
2937        if singular is None:
2938            singular = 'external_network_provider_configuration'
2939        if plural is None:
2940            plural = 'external_network_provider_configurations'
2941        writer.write_start(plural)
2942        if type(objs) == List:
2943            href = objs.href
2944            if href is not None:
2945                writer.write_attribute('href', href)
2946        for obj in objs:
2947            ExternalNetworkProviderConfigurationWriter.write_one(obj, writer, singular)
2948        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ExternalNetworkProviderConfigurationWriter()
2910    def __init__(self):
2911        super(ExternalNetworkProviderConfigurationWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2913    @staticmethod
2914    def write_one(obj, writer, singular=None):
2915        if singular is None:
2916            singular = 'external_network_provider_configuration'
2917        writer.write_start(singular)
2918        href = obj.href
2919        if href is not None:
2920            writer.write_attribute('href', href)
2921        if obj.id is not None:
2922            writer.write_attribute('id', obj.id)
2923        if obj.comment is not None:
2924            Writer.write_string(writer, 'comment', obj.comment)
2925        if obj.description is not None:
2926            Writer.write_string(writer, 'description', obj.description)
2927        if obj.name is not None:
2928            Writer.write_string(writer, 'name', obj.name)
2929        if obj.external_network_provider is not None:
2930            ExternalProviderWriter.write_one(obj.external_network_provider, writer, 'external_network_provider')
2931        if obj.host is not None:
2932            HostWriter.write_one(obj.host, writer, 'host')
2933        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2935    @staticmethod
2936    def write_many(objs, writer, singular=None, plural=None):
2937        if singular is None:
2938            singular = 'external_network_provider_configuration'
2939        if plural is None:
2940            plural = 'external_network_provider_configurations'
2941        writer.write_start(plural)
2942        if type(objs) == List:
2943            href = objs.href
2944            if href is not None:
2945                writer.write_attribute('href', href)
2946        for obj in objs:
2947            ExternalNetworkProviderConfigurationWriter.write_one(obj, writer, singular)
2948        writer.write_end()
class ExternalProviderWriter(ovirtsdk4.writer.Writer):
2951class ExternalProviderWriter(Writer):
2952
2953    def __init__(self):
2954        super(ExternalProviderWriter, self).__init__()
2955
2956    @staticmethod
2957    def write_one(obj, writer, singular=None):
2958        if singular is None:
2959            singular = 'external_provider'
2960        writer.write_start(singular)
2961        href = obj.href
2962        if href is not None:
2963            writer.write_attribute('href', href)
2964        if obj.id is not None:
2965            writer.write_attribute('id', obj.id)
2966        if obj.authentication_url is not None:
2967            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
2968        if obj.comment is not None:
2969            Writer.write_string(writer, 'comment', obj.comment)
2970        if obj.description is not None:
2971            Writer.write_string(writer, 'description', obj.description)
2972        if obj.name is not None:
2973            Writer.write_string(writer, 'name', obj.name)
2974        if obj.password is not None:
2975            Writer.write_string(writer, 'password', obj.password)
2976        if obj.properties is not None:
2977            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
2978        if obj.requires_authentication is not None:
2979            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
2980        if obj.url is not None:
2981            Writer.write_string(writer, 'url', obj.url)
2982        if obj.username is not None:
2983            Writer.write_string(writer, 'username', obj.username)
2984        writer.write_end()
2985
2986    @staticmethod
2987    def write_many(objs, writer, singular=None, plural=None):
2988        if singular is None:
2989            singular = 'external_provider'
2990        if plural is None:
2991            plural = 'external_providers'
2992        writer.write_start(plural)
2993        if type(objs) == List:
2994            href = objs.href
2995            if href is not None:
2996                writer.write_attribute('href', href)
2997        for obj in objs:
2998            ExternalProviderWriter.write_one(obj, writer, singular)
2999        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ExternalProviderWriter()
2953    def __init__(self):
2954        super(ExternalProviderWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
2956    @staticmethod
2957    def write_one(obj, writer, singular=None):
2958        if singular is None:
2959            singular = 'external_provider'
2960        writer.write_start(singular)
2961        href = obj.href
2962        if href is not None:
2963            writer.write_attribute('href', href)
2964        if obj.id is not None:
2965            writer.write_attribute('id', obj.id)
2966        if obj.authentication_url is not None:
2967            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
2968        if obj.comment is not None:
2969            Writer.write_string(writer, 'comment', obj.comment)
2970        if obj.description is not None:
2971            Writer.write_string(writer, 'description', obj.description)
2972        if obj.name is not None:
2973            Writer.write_string(writer, 'name', obj.name)
2974        if obj.password is not None:
2975            Writer.write_string(writer, 'password', obj.password)
2976        if obj.properties is not None:
2977            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
2978        if obj.requires_authentication is not None:
2979            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
2980        if obj.url is not None:
2981            Writer.write_string(writer, 'url', obj.url)
2982        if obj.username is not None:
2983            Writer.write_string(writer, 'username', obj.username)
2984        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
2986    @staticmethod
2987    def write_many(objs, writer, singular=None, plural=None):
2988        if singular is None:
2989            singular = 'external_provider'
2990        if plural is None:
2991            plural = 'external_providers'
2992        writer.write_start(plural)
2993        if type(objs) == List:
2994            href = objs.href
2995            if href is not None:
2996                writer.write_attribute('href', href)
2997        for obj in objs:
2998            ExternalProviderWriter.write_one(obj, writer, singular)
2999        writer.write_end()
class ExternalTemplateImportWriter(ovirtsdk4.writer.Writer):
3002class ExternalTemplateImportWriter(Writer):
3003
3004    def __init__(self):
3005        super(ExternalTemplateImportWriter, self).__init__()
3006
3007    @staticmethod
3008    def write_one(obj, writer, singular=None):
3009        if singular is None:
3010            singular = 'external_template_import'
3011        writer.write_start(singular)
3012        href = obj.href
3013        if href is not None:
3014            writer.write_attribute('href', href)
3015        if obj.clone is not None:
3016            Writer.write_boolean(writer, 'clone', obj.clone)
3017        if obj.url is not None:
3018            Writer.write_string(writer, 'url', obj.url)
3019        if obj.cluster is not None:
3020            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
3021        if obj.cpu_profile is not None:
3022            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
3023        if obj.host is not None:
3024            HostWriter.write_one(obj.host, writer, 'host')
3025        if obj.quota is not None:
3026            QuotaWriter.write_one(obj.quota, writer, 'quota')
3027        if obj.storage_domain is not None:
3028            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
3029        if obj.template is not None:
3030            TemplateWriter.write_one(obj.template, writer, 'template')
3031        writer.write_end()
3032
3033    @staticmethod
3034    def write_many(objs, writer, singular=None, plural=None):
3035        if singular is None:
3036            singular = 'external_template_import'
3037        if plural is None:
3038            plural = 'external_template_imports'
3039        writer.write_start(plural)
3040        if type(objs) == List:
3041            href = objs.href
3042            if href is not None:
3043                writer.write_attribute('href', href)
3044        for obj in objs:
3045            ExternalTemplateImportWriter.write_one(obj, writer, singular)
3046        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ExternalTemplateImportWriter()
3004    def __init__(self):
3005        super(ExternalTemplateImportWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3007    @staticmethod
3008    def write_one(obj, writer, singular=None):
3009        if singular is None:
3010            singular = 'external_template_import'
3011        writer.write_start(singular)
3012        href = obj.href
3013        if href is not None:
3014            writer.write_attribute('href', href)
3015        if obj.clone is not None:
3016            Writer.write_boolean(writer, 'clone', obj.clone)
3017        if obj.url is not None:
3018            Writer.write_string(writer, 'url', obj.url)
3019        if obj.cluster is not None:
3020            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
3021        if obj.cpu_profile is not None:
3022            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
3023        if obj.host is not None:
3024            HostWriter.write_one(obj.host, writer, 'host')
3025        if obj.quota is not None:
3026            QuotaWriter.write_one(obj.quota, writer, 'quota')
3027        if obj.storage_domain is not None:
3028            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
3029        if obj.template is not None:
3030            TemplateWriter.write_one(obj.template, writer, 'template')
3031        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3033    @staticmethod
3034    def write_many(objs, writer, singular=None, plural=None):
3035        if singular is None:
3036            singular = 'external_template_import'
3037        if plural is None:
3038            plural = 'external_template_imports'
3039        writer.write_start(plural)
3040        if type(objs) == List:
3041            href = objs.href
3042            if href is not None:
3043                writer.write_attribute('href', href)
3044        for obj in objs:
3045            ExternalTemplateImportWriter.write_one(obj, writer, singular)
3046        writer.write_end()
class ExternalVmImportWriter(ovirtsdk4.writer.Writer):
3049class ExternalVmImportWriter(Writer):
3050
3051    def __init__(self):
3052        super(ExternalVmImportWriter, self).__init__()
3053
3054    @staticmethod
3055    def write_one(obj, writer, singular=None):
3056        if singular is None:
3057            singular = 'external_vm_import'
3058        writer.write_start(singular)
3059        href = obj.href
3060        if href is not None:
3061            writer.write_attribute('href', href)
3062        if obj.name is not None:
3063            Writer.write_string(writer, 'name', obj.name)
3064        if obj.password is not None:
3065            Writer.write_string(writer, 'password', obj.password)
3066        if obj.provider is not None:
3067            Writer.write_string(writer, 'provider', obj.provider.value)
3068        if obj.sparse is not None:
3069            Writer.write_boolean(writer, 'sparse', obj.sparse)
3070        if obj.url is not None:
3071            Writer.write_string(writer, 'url', obj.url)
3072        if obj.username is not None:
3073            Writer.write_string(writer, 'username', obj.username)
3074        if obj.cluster is not None:
3075            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
3076        if obj.cpu_profile is not None:
3077            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
3078        if obj.drivers_iso is not None:
3079            FileWriter.write_one(obj.drivers_iso, writer, 'drivers_iso')
3080        if obj.host is not None:
3081            HostWriter.write_one(obj.host, writer, 'host')
3082        if obj.quota is not None:
3083            QuotaWriter.write_one(obj.quota, writer, 'quota')
3084        if obj.storage_domain is not None:
3085            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
3086        if obj.vm is not None:
3087            VmWriter.write_one(obj.vm, writer, 'vm')
3088        writer.write_end()
3089
3090    @staticmethod
3091    def write_many(objs, writer, singular=None, plural=None):
3092        if singular is None:
3093            singular = 'external_vm_import'
3094        if plural is None:
3095            plural = 'external_vm_imports'
3096        writer.write_start(plural)
3097        if type(objs) == List:
3098            href = objs.href
3099            if href is not None:
3100                writer.write_attribute('href', href)
3101        for obj in objs:
3102            ExternalVmImportWriter.write_one(obj, writer, singular)
3103        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ExternalVmImportWriter()
3051    def __init__(self):
3052        super(ExternalVmImportWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3054    @staticmethod
3055    def write_one(obj, writer, singular=None):
3056        if singular is None:
3057            singular = 'external_vm_import'
3058        writer.write_start(singular)
3059        href = obj.href
3060        if href is not None:
3061            writer.write_attribute('href', href)
3062        if obj.name is not None:
3063            Writer.write_string(writer, 'name', obj.name)
3064        if obj.password is not None:
3065            Writer.write_string(writer, 'password', obj.password)
3066        if obj.provider is not None:
3067            Writer.write_string(writer, 'provider', obj.provider.value)
3068        if obj.sparse is not None:
3069            Writer.write_boolean(writer, 'sparse', obj.sparse)
3070        if obj.url is not None:
3071            Writer.write_string(writer, 'url', obj.url)
3072        if obj.username is not None:
3073            Writer.write_string(writer, 'username', obj.username)
3074        if obj.cluster is not None:
3075            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
3076        if obj.cpu_profile is not None:
3077            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
3078        if obj.drivers_iso is not None:
3079            FileWriter.write_one(obj.drivers_iso, writer, 'drivers_iso')
3080        if obj.host is not None:
3081            HostWriter.write_one(obj.host, writer, 'host')
3082        if obj.quota is not None:
3083            QuotaWriter.write_one(obj.quota, writer, 'quota')
3084        if obj.storage_domain is not None:
3085            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
3086        if obj.vm is not None:
3087            VmWriter.write_one(obj.vm, writer, 'vm')
3088        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3090    @staticmethod
3091    def write_many(objs, writer, singular=None, plural=None):
3092        if singular is None:
3093            singular = 'external_vm_import'
3094        if plural is None:
3095            plural = 'external_vm_imports'
3096        writer.write_start(plural)
3097        if type(objs) == List:
3098            href = objs.href
3099            if href is not None:
3100                writer.write_attribute('href', href)
3101        for obj in objs:
3102            ExternalVmImportWriter.write_one(obj, writer, singular)
3103        writer.write_end()
class FaultWriter(ovirtsdk4.writer.Writer):
3106class FaultWriter(Writer):
3107
3108    def __init__(self):
3109        super(FaultWriter, self).__init__()
3110
3111    @staticmethod
3112    def write_one(obj, writer, singular=None):
3113        if singular is None:
3114            singular = 'fault'
3115        writer.write_start(singular)
3116        href = obj.href
3117        if href is not None:
3118            writer.write_attribute('href', href)
3119        if obj.detail is not None:
3120            Writer.write_string(writer, 'detail', obj.detail)
3121        if obj.reason is not None:
3122            Writer.write_string(writer, 'reason', obj.reason)
3123        writer.write_end()
3124
3125    @staticmethod
3126    def write_many(objs, writer, singular=None, plural=None):
3127        if singular is None:
3128            singular = 'fault'
3129        if plural is None:
3130            plural = 'faults'
3131        writer.write_start(plural)
3132        if type(objs) == List:
3133            href = objs.href
3134            if href is not None:
3135                writer.write_attribute('href', href)
3136        for obj in objs:
3137            FaultWriter.write_one(obj, writer, singular)
3138        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

FaultWriter()
3108    def __init__(self):
3109        super(FaultWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3111    @staticmethod
3112    def write_one(obj, writer, singular=None):
3113        if singular is None:
3114            singular = 'fault'
3115        writer.write_start(singular)
3116        href = obj.href
3117        if href is not None:
3118            writer.write_attribute('href', href)
3119        if obj.detail is not None:
3120            Writer.write_string(writer, 'detail', obj.detail)
3121        if obj.reason is not None:
3122            Writer.write_string(writer, 'reason', obj.reason)
3123        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3125    @staticmethod
3126    def write_many(objs, writer, singular=None, plural=None):
3127        if singular is None:
3128            singular = 'fault'
3129        if plural is None:
3130            plural = 'faults'
3131        writer.write_start(plural)
3132        if type(objs) == List:
3133            href = objs.href
3134            if href is not None:
3135                writer.write_attribute('href', href)
3136        for obj in objs:
3137            FaultWriter.write_one(obj, writer, singular)
3138        writer.write_end()
class FencingPolicyWriter(ovirtsdk4.writer.Writer):
3141class FencingPolicyWriter(Writer):
3142
3143    def __init__(self):
3144        super(FencingPolicyWriter, self).__init__()
3145
3146    @staticmethod
3147    def write_one(obj, writer, singular=None):
3148        if singular is None:
3149            singular = 'fencing_policy'
3150        writer.write_start(singular)
3151        href = obj.href
3152        if href is not None:
3153            writer.write_attribute('href', href)
3154        if obj.enabled is not None:
3155            Writer.write_boolean(writer, 'enabled', obj.enabled)
3156        if obj.skip_if_connectivity_broken is not None:
3157            SkipIfConnectivityBrokenWriter.write_one(obj.skip_if_connectivity_broken, writer, 'skip_if_connectivity_broken')
3158        if obj.skip_if_gluster_bricks_up is not None:
3159            Writer.write_boolean(writer, 'skip_if_gluster_bricks_up', obj.skip_if_gluster_bricks_up)
3160        if obj.skip_if_gluster_quorum_not_met is not None:
3161            Writer.write_boolean(writer, 'skip_if_gluster_quorum_not_met', obj.skip_if_gluster_quorum_not_met)
3162        if obj.skip_if_sd_active is not None:
3163            SkipIfSdActiveWriter.write_one(obj.skip_if_sd_active, writer, 'skip_if_sd_active')
3164        writer.write_end()
3165
3166    @staticmethod
3167    def write_many(objs, writer, singular=None, plural=None):
3168        if singular is None:
3169            singular = 'fencing_policy'
3170        if plural is None:
3171            plural = 'fencing_policies'
3172        writer.write_start(plural)
3173        if type(objs) == List:
3174            href = objs.href
3175            if href is not None:
3176                writer.write_attribute('href', href)
3177        for obj in objs:
3178            FencingPolicyWriter.write_one(obj, writer, singular)
3179        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

FencingPolicyWriter()
3143    def __init__(self):
3144        super(FencingPolicyWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3146    @staticmethod
3147    def write_one(obj, writer, singular=None):
3148        if singular is None:
3149            singular = 'fencing_policy'
3150        writer.write_start(singular)
3151        href = obj.href
3152        if href is not None:
3153            writer.write_attribute('href', href)
3154        if obj.enabled is not None:
3155            Writer.write_boolean(writer, 'enabled', obj.enabled)
3156        if obj.skip_if_connectivity_broken is not None:
3157            SkipIfConnectivityBrokenWriter.write_one(obj.skip_if_connectivity_broken, writer, 'skip_if_connectivity_broken')
3158        if obj.skip_if_gluster_bricks_up is not None:
3159            Writer.write_boolean(writer, 'skip_if_gluster_bricks_up', obj.skip_if_gluster_bricks_up)
3160        if obj.skip_if_gluster_quorum_not_met is not None:
3161            Writer.write_boolean(writer, 'skip_if_gluster_quorum_not_met', obj.skip_if_gluster_quorum_not_met)
3162        if obj.skip_if_sd_active is not None:
3163            SkipIfSdActiveWriter.write_one(obj.skip_if_sd_active, writer, 'skip_if_sd_active')
3164        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3166    @staticmethod
3167    def write_many(objs, writer, singular=None, plural=None):
3168        if singular is None:
3169            singular = 'fencing_policy'
3170        if plural is None:
3171            plural = 'fencing_policies'
3172        writer.write_start(plural)
3173        if type(objs) == List:
3174            href = objs.href
3175            if href is not None:
3176                writer.write_attribute('href', href)
3177        for obj in objs:
3178            FencingPolicyWriter.write_one(obj, writer, singular)
3179        writer.write_end()
class FileWriter(ovirtsdk4.writer.Writer):
3182class FileWriter(Writer):
3183
3184    def __init__(self):
3185        super(FileWriter, self).__init__()
3186
3187    @staticmethod
3188    def write_one(obj, writer, singular=None):
3189        if singular is None:
3190            singular = 'file'
3191        writer.write_start(singular)
3192        href = obj.href
3193        if href is not None:
3194            writer.write_attribute('href', href)
3195        if obj.id is not None:
3196            writer.write_attribute('id', obj.id)
3197        if obj.comment is not None:
3198            Writer.write_string(writer, 'comment', obj.comment)
3199        if obj.content is not None:
3200            Writer.write_string(writer, 'content', obj.content)
3201        if obj.description is not None:
3202            Writer.write_string(writer, 'description', obj.description)
3203        if obj.name is not None:
3204            Writer.write_string(writer, 'name', obj.name)
3205        if obj.type is not None:
3206            Writer.write_string(writer, 'type', obj.type)
3207        if obj.storage_domain is not None:
3208            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
3209        writer.write_end()
3210
3211    @staticmethod
3212    def write_many(objs, writer, singular=None, plural=None):
3213        if singular is None:
3214            singular = 'file'
3215        if plural is None:
3216            plural = 'files'
3217        writer.write_start(plural)
3218        if type(objs) == List:
3219            href = objs.href
3220            if href is not None:
3221                writer.write_attribute('href', href)
3222        for obj in objs:
3223            FileWriter.write_one(obj, writer, singular)
3224        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

FileWriter()
3184    def __init__(self):
3185        super(FileWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3187    @staticmethod
3188    def write_one(obj, writer, singular=None):
3189        if singular is None:
3190            singular = 'file'
3191        writer.write_start(singular)
3192        href = obj.href
3193        if href is not None:
3194            writer.write_attribute('href', href)
3195        if obj.id is not None:
3196            writer.write_attribute('id', obj.id)
3197        if obj.comment is not None:
3198            Writer.write_string(writer, 'comment', obj.comment)
3199        if obj.content is not None:
3200            Writer.write_string(writer, 'content', obj.content)
3201        if obj.description is not None:
3202            Writer.write_string(writer, 'description', obj.description)
3203        if obj.name is not None:
3204            Writer.write_string(writer, 'name', obj.name)
3205        if obj.type is not None:
3206            Writer.write_string(writer, 'type', obj.type)
3207        if obj.storage_domain is not None:
3208            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
3209        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3211    @staticmethod
3212    def write_many(objs, writer, singular=None, plural=None):
3213        if singular is None:
3214            singular = 'file'
3215        if plural is None:
3216            plural = 'files'
3217        writer.write_start(plural)
3218        if type(objs) == List:
3219            href = objs.href
3220            if href is not None:
3221                writer.write_attribute('href', href)
3222        for obj in objs:
3223            FileWriter.write_one(obj, writer, singular)
3224        writer.write_end()
class FilterWriter(ovirtsdk4.writer.Writer):
3227class FilterWriter(Writer):
3228
3229    def __init__(self):
3230        super(FilterWriter, self).__init__()
3231
3232    @staticmethod
3233    def write_one(obj, writer, singular=None):
3234        if singular is None:
3235            singular = 'filter'
3236        writer.write_start(singular)
3237        href = obj.href
3238        if href is not None:
3239            writer.write_attribute('href', href)
3240        if obj.id is not None:
3241            writer.write_attribute('id', obj.id)
3242        if obj.comment is not None:
3243            Writer.write_string(writer, 'comment', obj.comment)
3244        if obj.description is not None:
3245            Writer.write_string(writer, 'description', obj.description)
3246        if obj.name is not None:
3247            Writer.write_string(writer, 'name', obj.name)
3248        if obj.position is not None:
3249            Writer.write_integer(writer, 'position', obj.position)
3250        if obj.scheduling_policy_unit is not None:
3251            SchedulingPolicyUnitWriter.write_one(obj.scheduling_policy_unit, writer, 'scheduling_policy_unit')
3252        writer.write_end()
3253
3254    @staticmethod
3255    def write_many(objs, writer, singular=None, plural=None):
3256        if singular is None:
3257            singular = 'filter'
3258        if plural is None:
3259            plural = 'filters'
3260        writer.write_start(plural)
3261        if type(objs) == List:
3262            href = objs.href
3263            if href is not None:
3264                writer.write_attribute('href', href)
3265        for obj in objs:
3266            FilterWriter.write_one(obj, writer, singular)
3267        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

FilterWriter()
3229    def __init__(self):
3230        super(FilterWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3232    @staticmethod
3233    def write_one(obj, writer, singular=None):
3234        if singular is None:
3235            singular = 'filter'
3236        writer.write_start(singular)
3237        href = obj.href
3238        if href is not None:
3239            writer.write_attribute('href', href)
3240        if obj.id is not None:
3241            writer.write_attribute('id', obj.id)
3242        if obj.comment is not None:
3243            Writer.write_string(writer, 'comment', obj.comment)
3244        if obj.description is not None:
3245            Writer.write_string(writer, 'description', obj.description)
3246        if obj.name is not None:
3247            Writer.write_string(writer, 'name', obj.name)
3248        if obj.position is not None:
3249            Writer.write_integer(writer, 'position', obj.position)
3250        if obj.scheduling_policy_unit is not None:
3251            SchedulingPolicyUnitWriter.write_one(obj.scheduling_policy_unit, writer, 'scheduling_policy_unit')
3252        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3254    @staticmethod
3255    def write_many(objs, writer, singular=None, plural=None):
3256        if singular is None:
3257            singular = 'filter'
3258        if plural is None:
3259            plural = 'filters'
3260        writer.write_start(plural)
3261        if type(objs) == List:
3262            href = objs.href
3263            if href is not None:
3264                writer.write_attribute('href', href)
3265        for obj in objs:
3266            FilterWriter.write_one(obj, writer, singular)
3267        writer.write_end()
class FloppyWriter(ovirtsdk4.writer.Writer):
3270class FloppyWriter(Writer):
3271
3272    def __init__(self):
3273        super(FloppyWriter, self).__init__()
3274
3275    @staticmethod
3276    def write_one(obj, writer, singular=None):
3277        if singular is None:
3278            singular = 'floppy'
3279        writer.write_start(singular)
3280        href = obj.href
3281        if href is not None:
3282            writer.write_attribute('href', href)
3283        if obj.id is not None:
3284            writer.write_attribute('id', obj.id)
3285        if obj.comment is not None:
3286            Writer.write_string(writer, 'comment', obj.comment)
3287        if obj.description is not None:
3288            Writer.write_string(writer, 'description', obj.description)
3289        if obj.file is not None:
3290            FileWriter.write_one(obj.file, writer, 'file')
3291        if obj.name is not None:
3292            Writer.write_string(writer, 'name', obj.name)
3293        if obj.instance_type is not None:
3294            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
3295        if obj.template is not None:
3296            TemplateWriter.write_one(obj.template, writer, 'template')
3297        if obj.vm is not None:
3298            VmWriter.write_one(obj.vm, writer, 'vm')
3299        if obj.vms is not None:
3300            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
3301        writer.write_end()
3302
3303    @staticmethod
3304    def write_many(objs, writer, singular=None, plural=None):
3305        if singular is None:
3306            singular = 'floppy'
3307        if plural is None:
3308            plural = 'floppies'
3309        writer.write_start(plural)
3310        if type(objs) == List:
3311            href = objs.href
3312            if href is not None:
3313                writer.write_attribute('href', href)
3314        for obj in objs:
3315            FloppyWriter.write_one(obj, writer, singular)
3316        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

FloppyWriter()
3272    def __init__(self):
3273        super(FloppyWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3275    @staticmethod
3276    def write_one(obj, writer, singular=None):
3277        if singular is None:
3278            singular = 'floppy'
3279        writer.write_start(singular)
3280        href = obj.href
3281        if href is not None:
3282            writer.write_attribute('href', href)
3283        if obj.id is not None:
3284            writer.write_attribute('id', obj.id)
3285        if obj.comment is not None:
3286            Writer.write_string(writer, 'comment', obj.comment)
3287        if obj.description is not None:
3288            Writer.write_string(writer, 'description', obj.description)
3289        if obj.file is not None:
3290            FileWriter.write_one(obj.file, writer, 'file')
3291        if obj.name is not None:
3292            Writer.write_string(writer, 'name', obj.name)
3293        if obj.instance_type is not None:
3294            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
3295        if obj.template is not None:
3296            TemplateWriter.write_one(obj.template, writer, 'template')
3297        if obj.vm is not None:
3298            VmWriter.write_one(obj.vm, writer, 'vm')
3299        if obj.vms is not None:
3300            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
3301        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3303    @staticmethod
3304    def write_many(objs, writer, singular=None, plural=None):
3305        if singular is None:
3306            singular = 'floppy'
3307        if plural is None:
3308            plural = 'floppies'
3309        writer.write_start(plural)
3310        if type(objs) == List:
3311            href = objs.href
3312            if href is not None:
3313                writer.write_attribute('href', href)
3314        for obj in objs:
3315            FloppyWriter.write_one(obj, writer, singular)
3316        writer.write_end()
class FopStatisticWriter(ovirtsdk4.writer.Writer):
3319class FopStatisticWriter(Writer):
3320
3321    def __init__(self):
3322        super(FopStatisticWriter, self).__init__()
3323
3324    @staticmethod
3325    def write_one(obj, writer, singular=None):
3326        if singular is None:
3327            singular = 'fop_statistic'
3328        writer.write_start(singular)
3329        href = obj.href
3330        if href is not None:
3331            writer.write_attribute('href', href)
3332        if obj.name is not None:
3333            Writer.write_string(writer, 'name', obj.name)
3334        if obj.statistics is not None:
3335            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
3336        writer.write_end()
3337
3338    @staticmethod
3339    def write_many(objs, writer, singular=None, plural=None):
3340        if singular is None:
3341            singular = 'fop_statistic'
3342        if plural is None:
3343            plural = 'fop_statistics'
3344        writer.write_start(plural)
3345        if type(objs) == List:
3346            href = objs.href
3347            if href is not None:
3348                writer.write_attribute('href', href)
3349        for obj in objs:
3350            FopStatisticWriter.write_one(obj, writer, singular)
3351        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

FopStatisticWriter()
3321    def __init__(self):
3322        super(FopStatisticWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3324    @staticmethod
3325    def write_one(obj, writer, singular=None):
3326        if singular is None:
3327            singular = 'fop_statistic'
3328        writer.write_start(singular)
3329        href = obj.href
3330        if href is not None:
3331            writer.write_attribute('href', href)
3332        if obj.name is not None:
3333            Writer.write_string(writer, 'name', obj.name)
3334        if obj.statistics is not None:
3335            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
3336        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3338    @staticmethod
3339    def write_many(objs, writer, singular=None, plural=None):
3340        if singular is None:
3341            singular = 'fop_statistic'
3342        if plural is None:
3343            plural = 'fop_statistics'
3344        writer.write_start(plural)
3345        if type(objs) == List:
3346            href = objs.href
3347            if href is not None:
3348                writer.write_attribute('href', href)
3349        for obj in objs:
3350            FopStatisticWriter.write_one(obj, writer, singular)
3351        writer.write_end()
class GlusterBrickWriter(ovirtsdk4.writer.Writer):
3354class GlusterBrickWriter(Writer):
3355
3356    def __init__(self):
3357        super(GlusterBrickWriter, self).__init__()
3358
3359    @staticmethod
3360    def write_one(obj, writer, singular=None):
3361        if singular is None:
3362            singular = 'brick'
3363        writer.write_start(singular)
3364        href = obj.href
3365        if href is not None:
3366            writer.write_attribute('href', href)
3367        if obj.id is not None:
3368            writer.write_attribute('id', obj.id)
3369        if obj.brick_dir is not None:
3370            Writer.write_string(writer, 'brick_dir', obj.brick_dir)
3371        if obj.comment is not None:
3372            Writer.write_string(writer, 'comment', obj.comment)
3373        if obj.description is not None:
3374            Writer.write_string(writer, 'description', obj.description)
3375        if obj.device is not None:
3376            Writer.write_string(writer, 'device', obj.device)
3377        if obj.fs_name is not None:
3378            Writer.write_string(writer, 'fs_name', obj.fs_name)
3379        if obj.gluster_clients is not None:
3380            GlusterClientWriter.write_many(obj.gluster_clients, writer, 'gluster_client', 'gluster_clients')
3381        if obj.memory_pools is not None:
3382            GlusterMemoryPoolWriter.write_many(obj.memory_pools, writer, 'memory_pool', 'memory_pools')
3383        if obj.mnt_options is not None:
3384            Writer.write_string(writer, 'mnt_options', obj.mnt_options)
3385        if obj.name is not None:
3386            Writer.write_string(writer, 'name', obj.name)
3387        if obj.pid is not None:
3388            Writer.write_integer(writer, 'pid', obj.pid)
3389        if obj.port is not None:
3390            Writer.write_integer(writer, 'port', obj.port)
3391        if obj.server_id is not None:
3392            Writer.write_string(writer, 'server_id', obj.server_id)
3393        if obj.status is not None:
3394            Writer.write_string(writer, 'status', obj.status.value)
3395        if obj.gluster_volume is not None:
3396            GlusterVolumeWriter.write_one(obj.gluster_volume, writer, 'gluster_volume')
3397        if obj.instance_type is not None:
3398            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
3399        if obj.statistics is not None:
3400            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
3401        if obj.template is not None:
3402            TemplateWriter.write_one(obj.template, writer, 'template')
3403        if obj.vm is not None:
3404            VmWriter.write_one(obj.vm, writer, 'vm')
3405        if obj.vms is not None:
3406            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
3407        writer.write_end()
3408
3409    @staticmethod
3410    def write_many(objs, writer, singular=None, plural=None):
3411        if singular is None:
3412            singular = 'brick'
3413        if plural is None:
3414            plural = 'bricks'
3415        writer.write_start(plural)
3416        if type(objs) == List:
3417            href = objs.href
3418            if href is not None:
3419                writer.write_attribute('href', href)
3420        for obj in objs:
3421            GlusterBrickWriter.write_one(obj, writer, singular)
3422        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

GlusterBrickWriter()
3356    def __init__(self):
3357        super(GlusterBrickWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3359    @staticmethod
3360    def write_one(obj, writer, singular=None):
3361        if singular is None:
3362            singular = 'brick'
3363        writer.write_start(singular)
3364        href = obj.href
3365        if href is not None:
3366            writer.write_attribute('href', href)
3367        if obj.id is not None:
3368            writer.write_attribute('id', obj.id)
3369        if obj.brick_dir is not None:
3370            Writer.write_string(writer, 'brick_dir', obj.brick_dir)
3371        if obj.comment is not None:
3372            Writer.write_string(writer, 'comment', obj.comment)
3373        if obj.description is not None:
3374            Writer.write_string(writer, 'description', obj.description)
3375        if obj.device is not None:
3376            Writer.write_string(writer, 'device', obj.device)
3377        if obj.fs_name is not None:
3378            Writer.write_string(writer, 'fs_name', obj.fs_name)
3379        if obj.gluster_clients is not None:
3380            GlusterClientWriter.write_many(obj.gluster_clients, writer, 'gluster_client', 'gluster_clients')
3381        if obj.memory_pools is not None:
3382            GlusterMemoryPoolWriter.write_many(obj.memory_pools, writer, 'memory_pool', 'memory_pools')
3383        if obj.mnt_options is not None:
3384            Writer.write_string(writer, 'mnt_options', obj.mnt_options)
3385        if obj.name is not None:
3386            Writer.write_string(writer, 'name', obj.name)
3387        if obj.pid is not None:
3388            Writer.write_integer(writer, 'pid', obj.pid)
3389        if obj.port is not None:
3390            Writer.write_integer(writer, 'port', obj.port)
3391        if obj.server_id is not None:
3392            Writer.write_string(writer, 'server_id', obj.server_id)
3393        if obj.status is not None:
3394            Writer.write_string(writer, 'status', obj.status.value)
3395        if obj.gluster_volume is not None:
3396            GlusterVolumeWriter.write_one(obj.gluster_volume, writer, 'gluster_volume')
3397        if obj.instance_type is not None:
3398            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
3399        if obj.statistics is not None:
3400            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
3401        if obj.template is not None:
3402            TemplateWriter.write_one(obj.template, writer, 'template')
3403        if obj.vm is not None:
3404            VmWriter.write_one(obj.vm, writer, 'vm')
3405        if obj.vms is not None:
3406            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
3407        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3409    @staticmethod
3410    def write_many(objs, writer, singular=None, plural=None):
3411        if singular is None:
3412            singular = 'brick'
3413        if plural is None:
3414            plural = 'bricks'
3415        writer.write_start(plural)
3416        if type(objs) == List:
3417            href = objs.href
3418            if href is not None:
3419                writer.write_attribute('href', href)
3420        for obj in objs:
3421            GlusterBrickWriter.write_one(obj, writer, singular)
3422        writer.write_end()
class GlusterBrickAdvancedDetailsWriter(ovirtsdk4.writer.Writer):
3425class GlusterBrickAdvancedDetailsWriter(Writer):
3426
3427    def __init__(self):
3428        super(GlusterBrickAdvancedDetailsWriter, self).__init__()
3429
3430    @staticmethod
3431    def write_one(obj, writer, singular=None):
3432        if singular is None:
3433            singular = 'gluster_brick_advanced_details'
3434        writer.write_start(singular)
3435        href = obj.href
3436        if href is not None:
3437            writer.write_attribute('href', href)
3438        if obj.id is not None:
3439            writer.write_attribute('id', obj.id)
3440        if obj.comment is not None:
3441            Writer.write_string(writer, 'comment', obj.comment)
3442        if obj.description is not None:
3443            Writer.write_string(writer, 'description', obj.description)
3444        if obj.device is not None:
3445            Writer.write_string(writer, 'device', obj.device)
3446        if obj.fs_name is not None:
3447            Writer.write_string(writer, 'fs_name', obj.fs_name)
3448        if obj.gluster_clients is not None:
3449            GlusterClientWriter.write_many(obj.gluster_clients, writer, 'gluster_client', 'gluster_clients')
3450        if obj.memory_pools is not None:
3451            GlusterMemoryPoolWriter.write_many(obj.memory_pools, writer, 'memory_pool', 'memory_pools')
3452        if obj.mnt_options is not None:
3453            Writer.write_string(writer, 'mnt_options', obj.mnt_options)
3454        if obj.name is not None:
3455            Writer.write_string(writer, 'name', obj.name)
3456        if obj.pid is not None:
3457            Writer.write_integer(writer, 'pid', obj.pid)
3458        if obj.port is not None:
3459            Writer.write_integer(writer, 'port', obj.port)
3460        if obj.instance_type is not None:
3461            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
3462        if obj.template is not None:
3463            TemplateWriter.write_one(obj.template, writer, 'template')
3464        if obj.vm is not None:
3465            VmWriter.write_one(obj.vm, writer, 'vm')
3466        if obj.vms is not None:
3467            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
3468        writer.write_end()
3469
3470    @staticmethod
3471    def write_many(objs, writer, singular=None, plural=None):
3472        if singular is None:
3473            singular = 'gluster_brick_advanced_details'
3474        if plural is None:
3475            plural = 'gluster_brick_advanced_detailss'
3476        writer.write_start(plural)
3477        if type(objs) == List:
3478            href = objs.href
3479            if href is not None:
3480                writer.write_attribute('href', href)
3481        for obj in objs:
3482            GlusterBrickAdvancedDetailsWriter.write_one(obj, writer, singular)
3483        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

GlusterBrickAdvancedDetailsWriter()
3427    def __init__(self):
3428        super(GlusterBrickAdvancedDetailsWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3430    @staticmethod
3431    def write_one(obj, writer, singular=None):
3432        if singular is None:
3433            singular = 'gluster_brick_advanced_details'
3434        writer.write_start(singular)
3435        href = obj.href
3436        if href is not None:
3437            writer.write_attribute('href', href)
3438        if obj.id is not None:
3439            writer.write_attribute('id', obj.id)
3440        if obj.comment is not None:
3441            Writer.write_string(writer, 'comment', obj.comment)
3442        if obj.description is not None:
3443            Writer.write_string(writer, 'description', obj.description)
3444        if obj.device is not None:
3445            Writer.write_string(writer, 'device', obj.device)
3446        if obj.fs_name is not None:
3447            Writer.write_string(writer, 'fs_name', obj.fs_name)
3448        if obj.gluster_clients is not None:
3449            GlusterClientWriter.write_many(obj.gluster_clients, writer, 'gluster_client', 'gluster_clients')
3450        if obj.memory_pools is not None:
3451            GlusterMemoryPoolWriter.write_many(obj.memory_pools, writer, 'memory_pool', 'memory_pools')
3452        if obj.mnt_options is not None:
3453            Writer.write_string(writer, 'mnt_options', obj.mnt_options)
3454        if obj.name is not None:
3455            Writer.write_string(writer, 'name', obj.name)
3456        if obj.pid is not None:
3457            Writer.write_integer(writer, 'pid', obj.pid)
3458        if obj.port is not None:
3459            Writer.write_integer(writer, 'port', obj.port)
3460        if obj.instance_type is not None:
3461            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
3462        if obj.template is not None:
3463            TemplateWriter.write_one(obj.template, writer, 'template')
3464        if obj.vm is not None:
3465            VmWriter.write_one(obj.vm, writer, 'vm')
3466        if obj.vms is not None:
3467            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
3468        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3470    @staticmethod
3471    def write_many(objs, writer, singular=None, plural=None):
3472        if singular is None:
3473            singular = 'gluster_brick_advanced_details'
3474        if plural is None:
3475            plural = 'gluster_brick_advanced_detailss'
3476        writer.write_start(plural)
3477        if type(objs) == List:
3478            href = objs.href
3479            if href is not None:
3480                writer.write_attribute('href', href)
3481        for obj in objs:
3482            GlusterBrickAdvancedDetailsWriter.write_one(obj, writer, singular)
3483        writer.write_end()
class GlusterBrickMemoryInfoWriter(ovirtsdk4.writer.Writer):
3486class GlusterBrickMemoryInfoWriter(Writer):
3487
3488    def __init__(self):
3489        super(GlusterBrickMemoryInfoWriter, self).__init__()
3490
3491    @staticmethod
3492    def write_one(obj, writer, singular=None):
3493        if singular is None:
3494            singular = 'brick_memoryinfo'
3495        writer.write_start(singular)
3496        href = obj.href
3497        if href is not None:
3498            writer.write_attribute('href', href)
3499        if obj.memory_pools is not None:
3500            GlusterMemoryPoolWriter.write_many(obj.memory_pools, writer, 'memory_pool', 'memory_pools')
3501        writer.write_end()
3502
3503    @staticmethod
3504    def write_many(objs, writer, singular=None, plural=None):
3505        if singular is None:
3506            singular = 'brick_memoryinfo'
3507        if plural is None:
3508            plural = 'gluster_brick_memory_infos'
3509        writer.write_start(plural)
3510        if type(objs) == List:
3511            href = objs.href
3512            if href is not None:
3513                writer.write_attribute('href', href)
3514        for obj in objs:
3515            GlusterBrickMemoryInfoWriter.write_one(obj, writer, singular)
3516        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

GlusterBrickMemoryInfoWriter()
3488    def __init__(self):
3489        super(GlusterBrickMemoryInfoWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3491    @staticmethod
3492    def write_one(obj, writer, singular=None):
3493        if singular is None:
3494            singular = 'brick_memoryinfo'
3495        writer.write_start(singular)
3496        href = obj.href
3497        if href is not None:
3498            writer.write_attribute('href', href)
3499        if obj.memory_pools is not None:
3500            GlusterMemoryPoolWriter.write_many(obj.memory_pools, writer, 'memory_pool', 'memory_pools')
3501        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3503    @staticmethod
3504    def write_many(objs, writer, singular=None, plural=None):
3505        if singular is None:
3506            singular = 'brick_memoryinfo'
3507        if plural is None:
3508            plural = 'gluster_brick_memory_infos'
3509        writer.write_start(plural)
3510        if type(objs) == List:
3511            href = objs.href
3512            if href is not None:
3513                writer.write_attribute('href', href)
3514        for obj in objs:
3515            GlusterBrickMemoryInfoWriter.write_one(obj, writer, singular)
3516        writer.write_end()
class GlusterClientWriter(ovirtsdk4.writer.Writer):
3519class GlusterClientWriter(Writer):
3520
3521    def __init__(self):
3522        super(GlusterClientWriter, self).__init__()
3523
3524    @staticmethod
3525    def write_one(obj, writer, singular=None):
3526        if singular is None:
3527            singular = 'gluster_client'
3528        writer.write_start(singular)
3529        href = obj.href
3530        if href is not None:
3531            writer.write_attribute('href', href)
3532        if obj.bytes_read is not None:
3533            Writer.write_integer(writer, 'bytes_read', obj.bytes_read)
3534        if obj.bytes_written is not None:
3535            Writer.write_integer(writer, 'bytes_written', obj.bytes_written)
3536        if obj.client_port is not None:
3537            Writer.write_integer(writer, 'client_port', obj.client_port)
3538        if obj.host_name is not None:
3539            Writer.write_string(writer, 'host_name', obj.host_name)
3540        writer.write_end()
3541
3542    @staticmethod
3543    def write_many(objs, writer, singular=None, plural=None):
3544        if singular is None:
3545            singular = 'gluster_client'
3546        if plural is None:
3547            plural = 'gluster_clients'
3548        writer.write_start(plural)
3549        if type(objs) == List:
3550            href = objs.href
3551            if href is not None:
3552                writer.write_attribute('href', href)
3553        for obj in objs:
3554            GlusterClientWriter.write_one(obj, writer, singular)
3555        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

GlusterClientWriter()
3521    def __init__(self):
3522        super(GlusterClientWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3524    @staticmethod
3525    def write_one(obj, writer, singular=None):
3526        if singular is None:
3527            singular = 'gluster_client'
3528        writer.write_start(singular)
3529        href = obj.href
3530        if href is not None:
3531            writer.write_attribute('href', href)
3532        if obj.bytes_read is not None:
3533            Writer.write_integer(writer, 'bytes_read', obj.bytes_read)
3534        if obj.bytes_written is not None:
3535            Writer.write_integer(writer, 'bytes_written', obj.bytes_written)
3536        if obj.client_port is not None:
3537            Writer.write_integer(writer, 'client_port', obj.client_port)
3538        if obj.host_name is not None:
3539            Writer.write_string(writer, 'host_name', obj.host_name)
3540        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3542    @staticmethod
3543    def write_many(objs, writer, singular=None, plural=None):
3544        if singular is None:
3545            singular = 'gluster_client'
3546        if plural is None:
3547            plural = 'gluster_clients'
3548        writer.write_start(plural)
3549        if type(objs) == List:
3550            href = objs.href
3551            if href is not None:
3552                writer.write_attribute('href', href)
3553        for obj in objs:
3554            GlusterClientWriter.write_one(obj, writer, singular)
3555        writer.write_end()
class GlusterHookWriter(ovirtsdk4.writer.Writer):
3558class GlusterHookWriter(Writer):
3559
3560    def __init__(self):
3561        super(GlusterHookWriter, self).__init__()
3562
3563    @staticmethod
3564    def write_one(obj, writer, singular=None):
3565        if singular is None:
3566            singular = 'gluster_hook'
3567        writer.write_start(singular)
3568        href = obj.href
3569        if href is not None:
3570            writer.write_attribute('href', href)
3571        if obj.id is not None:
3572            writer.write_attribute('id', obj.id)
3573        if obj.checksum is not None:
3574            Writer.write_string(writer, 'checksum', obj.checksum)
3575        if obj.comment is not None:
3576            Writer.write_string(writer, 'comment', obj.comment)
3577        if obj.conflict_status is not None:
3578            Writer.write_integer(writer, 'conflict_status', obj.conflict_status)
3579        if obj.conflicts is not None:
3580            Writer.write_string(writer, 'conflicts', obj.conflicts)
3581        if obj.content is not None:
3582            Writer.write_string(writer, 'content', obj.content)
3583        if obj.content_type is not None:
3584            Writer.write_string(writer, 'content_type', obj.content_type.value)
3585        if obj.description is not None:
3586            Writer.write_string(writer, 'description', obj.description)
3587        if obj.gluster_command is not None:
3588            Writer.write_string(writer, 'gluster_command', obj.gluster_command)
3589        if obj.name is not None:
3590            Writer.write_string(writer, 'name', obj.name)
3591        if obj.stage is not None:
3592            Writer.write_string(writer, 'stage', obj.stage.value)
3593        if obj.status is not None:
3594            Writer.write_string(writer, 'status', obj.status.value)
3595        if obj.cluster is not None:
3596            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
3597        if obj.server_hooks is not None:
3598            GlusterServerHookWriter.write_many(obj.server_hooks, writer, 'server_hook', 'server_hooks')
3599        writer.write_end()
3600
3601    @staticmethod
3602    def write_many(objs, writer, singular=None, plural=None):
3603        if singular is None:
3604            singular = 'gluster_hook'
3605        if plural is None:
3606            plural = 'gluster_hooks'
3607        writer.write_start(plural)
3608        if type(objs) == List:
3609            href = objs.href
3610            if href is not None:
3611                writer.write_attribute('href', href)
3612        for obj in objs:
3613            GlusterHookWriter.write_one(obj, writer, singular)
3614        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

GlusterHookWriter()
3560    def __init__(self):
3561        super(GlusterHookWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3563    @staticmethod
3564    def write_one(obj, writer, singular=None):
3565        if singular is None:
3566            singular = 'gluster_hook'
3567        writer.write_start(singular)
3568        href = obj.href
3569        if href is not None:
3570            writer.write_attribute('href', href)
3571        if obj.id is not None:
3572            writer.write_attribute('id', obj.id)
3573        if obj.checksum is not None:
3574            Writer.write_string(writer, 'checksum', obj.checksum)
3575        if obj.comment is not None:
3576            Writer.write_string(writer, 'comment', obj.comment)
3577        if obj.conflict_status is not None:
3578            Writer.write_integer(writer, 'conflict_status', obj.conflict_status)
3579        if obj.conflicts is not None:
3580            Writer.write_string(writer, 'conflicts', obj.conflicts)
3581        if obj.content is not None:
3582            Writer.write_string(writer, 'content', obj.content)
3583        if obj.content_type is not None:
3584            Writer.write_string(writer, 'content_type', obj.content_type.value)
3585        if obj.description is not None:
3586            Writer.write_string(writer, 'description', obj.description)
3587        if obj.gluster_command is not None:
3588            Writer.write_string(writer, 'gluster_command', obj.gluster_command)
3589        if obj.name is not None:
3590            Writer.write_string(writer, 'name', obj.name)
3591        if obj.stage is not None:
3592            Writer.write_string(writer, 'stage', obj.stage.value)
3593        if obj.status is not None:
3594            Writer.write_string(writer, 'status', obj.status.value)
3595        if obj.cluster is not None:
3596            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
3597        if obj.server_hooks is not None:
3598            GlusterServerHookWriter.write_many(obj.server_hooks, writer, 'server_hook', 'server_hooks')
3599        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3601    @staticmethod
3602    def write_many(objs, writer, singular=None, plural=None):
3603        if singular is None:
3604            singular = 'gluster_hook'
3605        if plural is None:
3606            plural = 'gluster_hooks'
3607        writer.write_start(plural)
3608        if type(objs) == List:
3609            href = objs.href
3610            if href is not None:
3611                writer.write_attribute('href', href)
3612        for obj in objs:
3613            GlusterHookWriter.write_one(obj, writer, singular)
3614        writer.write_end()
class GlusterMemoryPoolWriter(ovirtsdk4.writer.Writer):
3617class GlusterMemoryPoolWriter(Writer):
3618
3619    def __init__(self):
3620        super(GlusterMemoryPoolWriter, self).__init__()
3621
3622    @staticmethod
3623    def write_one(obj, writer, singular=None):
3624        if singular is None:
3625            singular = 'memory_pool'
3626        writer.write_start(singular)
3627        href = obj.href
3628        if href is not None:
3629            writer.write_attribute('href', href)
3630        if obj.id is not None:
3631            writer.write_attribute('id', obj.id)
3632        if obj.alloc_count is not None:
3633            Writer.write_integer(writer, 'alloc_count', obj.alloc_count)
3634        if obj.cold_count is not None:
3635            Writer.write_integer(writer, 'cold_count', obj.cold_count)
3636        if obj.comment is not None:
3637            Writer.write_string(writer, 'comment', obj.comment)
3638        if obj.description is not None:
3639            Writer.write_string(writer, 'description', obj.description)
3640        if obj.hot_count is not None:
3641            Writer.write_integer(writer, 'hot_count', obj.hot_count)
3642        if obj.max_alloc is not None:
3643            Writer.write_integer(writer, 'max_alloc', obj.max_alloc)
3644        if obj.max_stdalloc is not None:
3645            Writer.write_integer(writer, 'max_stdalloc', obj.max_stdalloc)
3646        if obj.name is not None:
3647            Writer.write_string(writer, 'name', obj.name)
3648        if obj.padded_size is not None:
3649            Writer.write_integer(writer, 'padded_size', obj.padded_size)
3650        if obj.pool_misses is not None:
3651            Writer.write_integer(writer, 'pool_misses', obj.pool_misses)
3652        if obj.type is not None:
3653            Writer.write_string(writer, 'type', obj.type)
3654        writer.write_end()
3655
3656    @staticmethod
3657    def write_many(objs, writer, singular=None, plural=None):
3658        if singular is None:
3659            singular = 'memory_pool'
3660        if plural is None:
3661            plural = 'memory_pools'
3662        writer.write_start(plural)
3663        if type(objs) == List:
3664            href = objs.href
3665            if href is not None:
3666                writer.write_attribute('href', href)
3667        for obj in objs:
3668            GlusterMemoryPoolWriter.write_one(obj, writer, singular)
3669        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

GlusterMemoryPoolWriter()
3619    def __init__(self):
3620        super(GlusterMemoryPoolWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3622    @staticmethod
3623    def write_one(obj, writer, singular=None):
3624        if singular is None:
3625            singular = 'memory_pool'
3626        writer.write_start(singular)
3627        href = obj.href
3628        if href is not None:
3629            writer.write_attribute('href', href)
3630        if obj.id is not None:
3631            writer.write_attribute('id', obj.id)
3632        if obj.alloc_count is not None:
3633            Writer.write_integer(writer, 'alloc_count', obj.alloc_count)
3634        if obj.cold_count is not None:
3635            Writer.write_integer(writer, 'cold_count', obj.cold_count)
3636        if obj.comment is not None:
3637            Writer.write_string(writer, 'comment', obj.comment)
3638        if obj.description is not None:
3639            Writer.write_string(writer, 'description', obj.description)
3640        if obj.hot_count is not None:
3641            Writer.write_integer(writer, 'hot_count', obj.hot_count)
3642        if obj.max_alloc is not None:
3643            Writer.write_integer(writer, 'max_alloc', obj.max_alloc)
3644        if obj.max_stdalloc is not None:
3645            Writer.write_integer(writer, 'max_stdalloc', obj.max_stdalloc)
3646        if obj.name is not None:
3647            Writer.write_string(writer, 'name', obj.name)
3648        if obj.padded_size is not None:
3649            Writer.write_integer(writer, 'padded_size', obj.padded_size)
3650        if obj.pool_misses is not None:
3651            Writer.write_integer(writer, 'pool_misses', obj.pool_misses)
3652        if obj.type is not None:
3653            Writer.write_string(writer, 'type', obj.type)
3654        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3656    @staticmethod
3657    def write_many(objs, writer, singular=None, plural=None):
3658        if singular is None:
3659            singular = 'memory_pool'
3660        if plural is None:
3661            plural = 'memory_pools'
3662        writer.write_start(plural)
3663        if type(objs) == List:
3664            href = objs.href
3665            if href is not None:
3666                writer.write_attribute('href', href)
3667        for obj in objs:
3668            GlusterMemoryPoolWriter.write_one(obj, writer, singular)
3669        writer.write_end()
class GlusterServerHookWriter(ovirtsdk4.writer.Writer):
3672class GlusterServerHookWriter(Writer):
3673
3674    def __init__(self):
3675        super(GlusterServerHookWriter, self).__init__()
3676
3677    @staticmethod
3678    def write_one(obj, writer, singular=None):
3679        if singular is None:
3680            singular = 'server_hook'
3681        writer.write_start(singular)
3682        href = obj.href
3683        if href is not None:
3684            writer.write_attribute('href', href)
3685        if obj.id is not None:
3686            writer.write_attribute('id', obj.id)
3687        if obj.checksum is not None:
3688            Writer.write_string(writer, 'checksum', obj.checksum)
3689        if obj.comment is not None:
3690            Writer.write_string(writer, 'comment', obj.comment)
3691        if obj.content_type is not None:
3692            Writer.write_string(writer, 'content_type', obj.content_type.value)
3693        if obj.description is not None:
3694            Writer.write_string(writer, 'description', obj.description)
3695        if obj.name is not None:
3696            Writer.write_string(writer, 'name', obj.name)
3697        if obj.status is not None:
3698            Writer.write_string(writer, 'status', obj.status.value)
3699        if obj.host is not None:
3700            HostWriter.write_one(obj.host, writer, 'host')
3701        writer.write_end()
3702
3703    @staticmethod
3704    def write_many(objs, writer, singular=None, plural=None):
3705        if singular is None:
3706            singular = 'server_hook'
3707        if plural is None:
3708            plural = 'server_hooks'
3709        writer.write_start(plural)
3710        if type(objs) == List:
3711            href = objs.href
3712            if href is not None:
3713                writer.write_attribute('href', href)
3714        for obj in objs:
3715            GlusterServerHookWriter.write_one(obj, writer, singular)
3716        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

GlusterServerHookWriter()
3674    def __init__(self):
3675        super(GlusterServerHookWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3677    @staticmethod
3678    def write_one(obj, writer, singular=None):
3679        if singular is None:
3680            singular = 'server_hook'
3681        writer.write_start(singular)
3682        href = obj.href
3683        if href is not None:
3684            writer.write_attribute('href', href)
3685        if obj.id is not None:
3686            writer.write_attribute('id', obj.id)
3687        if obj.checksum is not None:
3688            Writer.write_string(writer, 'checksum', obj.checksum)
3689        if obj.comment is not None:
3690            Writer.write_string(writer, 'comment', obj.comment)
3691        if obj.content_type is not None:
3692            Writer.write_string(writer, 'content_type', obj.content_type.value)
3693        if obj.description is not None:
3694            Writer.write_string(writer, 'description', obj.description)
3695        if obj.name is not None:
3696            Writer.write_string(writer, 'name', obj.name)
3697        if obj.status is not None:
3698            Writer.write_string(writer, 'status', obj.status.value)
3699        if obj.host is not None:
3700            HostWriter.write_one(obj.host, writer, 'host')
3701        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3703    @staticmethod
3704    def write_many(objs, writer, singular=None, plural=None):
3705        if singular is None:
3706            singular = 'server_hook'
3707        if plural is None:
3708            plural = 'server_hooks'
3709        writer.write_start(plural)
3710        if type(objs) == List:
3711            href = objs.href
3712            if href is not None:
3713                writer.write_attribute('href', href)
3714        for obj in objs:
3715            GlusterServerHookWriter.write_one(obj, writer, singular)
3716        writer.write_end()
class GlusterVolumeWriter(ovirtsdk4.writer.Writer):
3719class GlusterVolumeWriter(Writer):
3720
3721    def __init__(self):
3722        super(GlusterVolumeWriter, self).__init__()
3723
3724    @staticmethod
3725    def write_one(obj, writer, singular=None):
3726        if singular is None:
3727            singular = 'gluster_volume'
3728        writer.write_start(singular)
3729        href = obj.href
3730        if href is not None:
3731            writer.write_attribute('href', href)
3732        if obj.id is not None:
3733            writer.write_attribute('id', obj.id)
3734        if obj.comment is not None:
3735            Writer.write_string(writer, 'comment', obj.comment)
3736        if obj.description is not None:
3737            Writer.write_string(writer, 'description', obj.description)
3738        if obj.disperse_count is not None:
3739            Writer.write_integer(writer, 'disperse_count', obj.disperse_count)
3740        if obj.name is not None:
3741            Writer.write_string(writer, 'name', obj.name)
3742        if obj.options is not None:
3743            OptionWriter.write_many(obj.options, writer, 'option', 'options')
3744        if obj.redundancy_count is not None:
3745            Writer.write_integer(writer, 'redundancy_count', obj.redundancy_count)
3746        if obj.replica_count is not None:
3747            Writer.write_integer(writer, 'replica_count', obj.replica_count)
3748        if obj.status is not None:
3749            Writer.write_string(writer, 'status', obj.status.value)
3750        if obj.stripe_count is not None:
3751            Writer.write_integer(writer, 'stripe_count', obj.stripe_count)
3752        if obj.transport_types is not None:
3753            writer.write_start('transport_types')
3754            for item in obj.transport_types:
3755                if item is not None:
3756                    Writer.write_string(writer, 'transport_type', item.value)
3757            writer.write_end()
3758        if obj.volume_type is not None:
3759            Writer.write_string(writer, 'volume_type', obj.volume_type.value)
3760        if obj.bricks is not None:
3761            GlusterBrickWriter.write_many(obj.bricks, writer, 'brick', 'bricks')
3762        if obj.cluster is not None:
3763            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
3764        if obj.statistics is not None:
3765            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
3766        writer.write_end()
3767
3768    @staticmethod
3769    def write_many(objs, writer, singular=None, plural=None):
3770        if singular is None:
3771            singular = 'gluster_volume'
3772        if plural is None:
3773            plural = 'gluster_volumes'
3774        writer.write_start(plural)
3775        if type(objs) == List:
3776            href = objs.href
3777            if href is not None:
3778                writer.write_attribute('href', href)
3779        for obj in objs:
3780            GlusterVolumeWriter.write_one(obj, writer, singular)
3781        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

GlusterVolumeWriter()
3721    def __init__(self):
3722        super(GlusterVolumeWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3724    @staticmethod
3725    def write_one(obj, writer, singular=None):
3726        if singular is None:
3727            singular = 'gluster_volume'
3728        writer.write_start(singular)
3729        href = obj.href
3730        if href is not None:
3731            writer.write_attribute('href', href)
3732        if obj.id is not None:
3733            writer.write_attribute('id', obj.id)
3734        if obj.comment is not None:
3735            Writer.write_string(writer, 'comment', obj.comment)
3736        if obj.description is not None:
3737            Writer.write_string(writer, 'description', obj.description)
3738        if obj.disperse_count is not None:
3739            Writer.write_integer(writer, 'disperse_count', obj.disperse_count)
3740        if obj.name is not None:
3741            Writer.write_string(writer, 'name', obj.name)
3742        if obj.options is not None:
3743            OptionWriter.write_many(obj.options, writer, 'option', 'options')
3744        if obj.redundancy_count is not None:
3745            Writer.write_integer(writer, 'redundancy_count', obj.redundancy_count)
3746        if obj.replica_count is not None:
3747            Writer.write_integer(writer, 'replica_count', obj.replica_count)
3748        if obj.status is not None:
3749            Writer.write_string(writer, 'status', obj.status.value)
3750        if obj.stripe_count is not None:
3751            Writer.write_integer(writer, 'stripe_count', obj.stripe_count)
3752        if obj.transport_types is not None:
3753            writer.write_start('transport_types')
3754            for item in obj.transport_types:
3755                if item is not None:
3756                    Writer.write_string(writer, 'transport_type', item.value)
3757            writer.write_end()
3758        if obj.volume_type is not None:
3759            Writer.write_string(writer, 'volume_type', obj.volume_type.value)
3760        if obj.bricks is not None:
3761            GlusterBrickWriter.write_many(obj.bricks, writer, 'brick', 'bricks')
3762        if obj.cluster is not None:
3763            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
3764        if obj.statistics is not None:
3765            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
3766        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3768    @staticmethod
3769    def write_many(objs, writer, singular=None, plural=None):
3770        if singular is None:
3771            singular = 'gluster_volume'
3772        if plural is None:
3773            plural = 'gluster_volumes'
3774        writer.write_start(plural)
3775        if type(objs) == List:
3776            href = objs.href
3777            if href is not None:
3778                writer.write_attribute('href', href)
3779        for obj in objs:
3780            GlusterVolumeWriter.write_one(obj, writer, singular)
3781        writer.write_end()
class GlusterVolumeProfileDetailsWriter(ovirtsdk4.writer.Writer):
3784class GlusterVolumeProfileDetailsWriter(Writer):
3785
3786    def __init__(self):
3787        super(GlusterVolumeProfileDetailsWriter, self).__init__()
3788
3789    @staticmethod
3790    def write_one(obj, writer, singular=None):
3791        if singular is None:
3792            singular = 'gluster_volume_profile_details'
3793        writer.write_start(singular)
3794        href = obj.href
3795        if href is not None:
3796            writer.write_attribute('href', href)
3797        if obj.id is not None:
3798            writer.write_attribute('id', obj.id)
3799        if obj.brick_profile_details is not None:
3800            BrickProfileDetailWriter.write_many(obj.brick_profile_details, writer, 'brick_profile_detail', 'brick_profile_details')
3801        if obj.comment is not None:
3802            Writer.write_string(writer, 'comment', obj.comment)
3803        if obj.description is not None:
3804            Writer.write_string(writer, 'description', obj.description)
3805        if obj.name is not None:
3806            Writer.write_string(writer, 'name', obj.name)
3807        if obj.nfs_profile_details is not None:
3808            NfsProfileDetailWriter.write_many(obj.nfs_profile_details, writer, 'nfs_profile_detail', 'nfs_profile_details')
3809        writer.write_end()
3810
3811    @staticmethod
3812    def write_many(objs, writer, singular=None, plural=None):
3813        if singular is None:
3814            singular = 'gluster_volume_profile_details'
3815        if plural is None:
3816            plural = 'gluster_volume_profile_detailss'
3817        writer.write_start(plural)
3818        if type(objs) == List:
3819            href = objs.href
3820            if href is not None:
3821                writer.write_attribute('href', href)
3822        for obj in objs:
3823            GlusterVolumeProfileDetailsWriter.write_one(obj, writer, singular)
3824        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

GlusterVolumeProfileDetailsWriter()
3786    def __init__(self):
3787        super(GlusterVolumeProfileDetailsWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3789    @staticmethod
3790    def write_one(obj, writer, singular=None):
3791        if singular is None:
3792            singular = 'gluster_volume_profile_details'
3793        writer.write_start(singular)
3794        href = obj.href
3795        if href is not None:
3796            writer.write_attribute('href', href)
3797        if obj.id is not None:
3798            writer.write_attribute('id', obj.id)
3799        if obj.brick_profile_details is not None:
3800            BrickProfileDetailWriter.write_many(obj.brick_profile_details, writer, 'brick_profile_detail', 'brick_profile_details')
3801        if obj.comment is not None:
3802            Writer.write_string(writer, 'comment', obj.comment)
3803        if obj.description is not None:
3804            Writer.write_string(writer, 'description', obj.description)
3805        if obj.name is not None:
3806            Writer.write_string(writer, 'name', obj.name)
3807        if obj.nfs_profile_details is not None:
3808            NfsProfileDetailWriter.write_many(obj.nfs_profile_details, writer, 'nfs_profile_detail', 'nfs_profile_details')
3809        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3811    @staticmethod
3812    def write_many(objs, writer, singular=None, plural=None):
3813        if singular is None:
3814            singular = 'gluster_volume_profile_details'
3815        if plural is None:
3816            plural = 'gluster_volume_profile_detailss'
3817        writer.write_start(plural)
3818        if type(objs) == List:
3819            href = objs.href
3820            if href is not None:
3821                writer.write_attribute('href', href)
3822        for obj in objs:
3823            GlusterVolumeProfileDetailsWriter.write_one(obj, writer, singular)
3824        writer.write_end()
class GracePeriodWriter(ovirtsdk4.writer.Writer):
3827class GracePeriodWriter(Writer):
3828
3829    def __init__(self):
3830        super(GracePeriodWriter, self).__init__()
3831
3832    @staticmethod
3833    def write_one(obj, writer, singular=None):
3834        if singular is None:
3835            singular = 'grace_period'
3836        writer.write_start(singular)
3837        href = obj.href
3838        if href is not None:
3839            writer.write_attribute('href', href)
3840        if obj.expiry is not None:
3841            Writer.write_integer(writer, 'expiry', obj.expiry)
3842        writer.write_end()
3843
3844    @staticmethod
3845    def write_many(objs, writer, singular=None, plural=None):
3846        if singular is None:
3847            singular = 'grace_period'
3848        if plural is None:
3849            plural = 'grace_periods'
3850        writer.write_start(plural)
3851        if type(objs) == List:
3852            href = objs.href
3853            if href is not None:
3854                writer.write_attribute('href', href)
3855        for obj in objs:
3856            GracePeriodWriter.write_one(obj, writer, singular)
3857        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

GracePeriodWriter()
3829    def __init__(self):
3830        super(GracePeriodWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3832    @staticmethod
3833    def write_one(obj, writer, singular=None):
3834        if singular is None:
3835            singular = 'grace_period'
3836        writer.write_start(singular)
3837        href = obj.href
3838        if href is not None:
3839            writer.write_attribute('href', href)
3840        if obj.expiry is not None:
3841            Writer.write_integer(writer, 'expiry', obj.expiry)
3842        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3844    @staticmethod
3845    def write_many(objs, writer, singular=None, plural=None):
3846        if singular is None:
3847            singular = 'grace_period'
3848        if plural is None:
3849            plural = 'grace_periods'
3850        writer.write_start(plural)
3851        if type(objs) == List:
3852            href = objs.href
3853            if href is not None:
3854                writer.write_attribute('href', href)
3855        for obj in objs:
3856            GracePeriodWriter.write_one(obj, writer, singular)
3857        writer.write_end()
class GraphicsConsoleWriter(ovirtsdk4.writer.Writer):
3860class GraphicsConsoleWriter(Writer):
3861
3862    def __init__(self):
3863        super(GraphicsConsoleWriter, self).__init__()
3864
3865    @staticmethod
3866    def write_one(obj, writer, singular=None):
3867        if singular is None:
3868            singular = 'graphics_console'
3869        writer.write_start(singular)
3870        href = obj.href
3871        if href is not None:
3872            writer.write_attribute('href', href)
3873        if obj.id is not None:
3874            writer.write_attribute('id', obj.id)
3875        if obj.address is not None:
3876            Writer.write_string(writer, 'address', obj.address)
3877        if obj.comment is not None:
3878            Writer.write_string(writer, 'comment', obj.comment)
3879        if obj.description is not None:
3880            Writer.write_string(writer, 'description', obj.description)
3881        if obj.name is not None:
3882            Writer.write_string(writer, 'name', obj.name)
3883        if obj.port is not None:
3884            Writer.write_integer(writer, 'port', obj.port)
3885        if obj.protocol is not None:
3886            Writer.write_string(writer, 'protocol', obj.protocol.value)
3887        if obj.tls_port is not None:
3888            Writer.write_integer(writer, 'tls_port', obj.tls_port)
3889        if obj.instance_type is not None:
3890            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
3891        if obj.template is not None:
3892            TemplateWriter.write_one(obj.template, writer, 'template')
3893        if obj.vm is not None:
3894            VmWriter.write_one(obj.vm, writer, 'vm')
3895        writer.write_end()
3896
3897    @staticmethod
3898    def write_many(objs, writer, singular=None, plural=None):
3899        if singular is None:
3900            singular = 'graphics_console'
3901        if plural is None:
3902            plural = 'graphics_consoles'
3903        writer.write_start(plural)
3904        if type(objs) == List:
3905            href = objs.href
3906            if href is not None:
3907                writer.write_attribute('href', href)
3908        for obj in objs:
3909            GraphicsConsoleWriter.write_one(obj, writer, singular)
3910        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

GraphicsConsoleWriter()
3862    def __init__(self):
3863        super(GraphicsConsoleWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3865    @staticmethod
3866    def write_one(obj, writer, singular=None):
3867        if singular is None:
3868            singular = 'graphics_console'
3869        writer.write_start(singular)
3870        href = obj.href
3871        if href is not None:
3872            writer.write_attribute('href', href)
3873        if obj.id is not None:
3874            writer.write_attribute('id', obj.id)
3875        if obj.address is not None:
3876            Writer.write_string(writer, 'address', obj.address)
3877        if obj.comment is not None:
3878            Writer.write_string(writer, 'comment', obj.comment)
3879        if obj.description is not None:
3880            Writer.write_string(writer, 'description', obj.description)
3881        if obj.name is not None:
3882            Writer.write_string(writer, 'name', obj.name)
3883        if obj.port is not None:
3884            Writer.write_integer(writer, 'port', obj.port)
3885        if obj.protocol is not None:
3886            Writer.write_string(writer, 'protocol', obj.protocol.value)
3887        if obj.tls_port is not None:
3888            Writer.write_integer(writer, 'tls_port', obj.tls_port)
3889        if obj.instance_type is not None:
3890            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
3891        if obj.template is not None:
3892            TemplateWriter.write_one(obj.template, writer, 'template')
3893        if obj.vm is not None:
3894            VmWriter.write_one(obj.vm, writer, 'vm')
3895        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3897    @staticmethod
3898    def write_many(objs, writer, singular=None, plural=None):
3899        if singular is None:
3900            singular = 'graphics_console'
3901        if plural is None:
3902            plural = 'graphics_consoles'
3903        writer.write_start(plural)
3904        if type(objs) == List:
3905            href = objs.href
3906            if href is not None:
3907                writer.write_attribute('href', href)
3908        for obj in objs:
3909            GraphicsConsoleWriter.write_one(obj, writer, singular)
3910        writer.write_end()
class GroupWriter(ovirtsdk4.writer.Writer):
3913class GroupWriter(Writer):
3914
3915    def __init__(self):
3916        super(GroupWriter, self).__init__()
3917
3918    @staticmethod
3919    def write_one(obj, writer, singular=None):
3920        if singular is None:
3921            singular = 'group'
3922        writer.write_start(singular)
3923        href = obj.href
3924        if href is not None:
3925            writer.write_attribute('href', href)
3926        if obj.id is not None:
3927            writer.write_attribute('id', obj.id)
3928        if obj.comment is not None:
3929            Writer.write_string(writer, 'comment', obj.comment)
3930        if obj.description is not None:
3931            Writer.write_string(writer, 'description', obj.description)
3932        if obj.domain_entry_id is not None:
3933            Writer.write_string(writer, 'domain_entry_id', obj.domain_entry_id)
3934        if obj.name is not None:
3935            Writer.write_string(writer, 'name', obj.name)
3936        if obj.namespace is not None:
3937            Writer.write_string(writer, 'namespace', obj.namespace)
3938        if obj.domain is not None:
3939            DomainWriter.write_one(obj.domain, writer, 'domain')
3940        if obj.permissions is not None:
3941            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
3942        if obj.roles is not None:
3943            RoleWriter.write_many(obj.roles, writer, 'role', 'roles')
3944        if obj.tags is not None:
3945            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
3946        writer.write_end()
3947
3948    @staticmethod
3949    def write_many(objs, writer, singular=None, plural=None):
3950        if singular is None:
3951            singular = 'group'
3952        if plural is None:
3953            plural = 'groups'
3954        writer.write_start(plural)
3955        if type(objs) == List:
3956            href = objs.href
3957            if href is not None:
3958                writer.write_attribute('href', href)
3959        for obj in objs:
3960            GroupWriter.write_one(obj, writer, singular)
3961        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

GroupWriter()
3915    def __init__(self):
3916        super(GroupWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3918    @staticmethod
3919    def write_one(obj, writer, singular=None):
3920        if singular is None:
3921            singular = 'group'
3922        writer.write_start(singular)
3923        href = obj.href
3924        if href is not None:
3925            writer.write_attribute('href', href)
3926        if obj.id is not None:
3927            writer.write_attribute('id', obj.id)
3928        if obj.comment is not None:
3929            Writer.write_string(writer, 'comment', obj.comment)
3930        if obj.description is not None:
3931            Writer.write_string(writer, 'description', obj.description)
3932        if obj.domain_entry_id is not None:
3933            Writer.write_string(writer, 'domain_entry_id', obj.domain_entry_id)
3934        if obj.name is not None:
3935            Writer.write_string(writer, 'name', obj.name)
3936        if obj.namespace is not None:
3937            Writer.write_string(writer, 'namespace', obj.namespace)
3938        if obj.domain is not None:
3939            DomainWriter.write_one(obj.domain, writer, 'domain')
3940        if obj.permissions is not None:
3941            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
3942        if obj.roles is not None:
3943            RoleWriter.write_many(obj.roles, writer, 'role', 'roles')
3944        if obj.tags is not None:
3945            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
3946        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3948    @staticmethod
3949    def write_many(objs, writer, singular=None, plural=None):
3950        if singular is None:
3951            singular = 'group'
3952        if plural is None:
3953            plural = 'groups'
3954        writer.write_start(plural)
3955        if type(objs) == List:
3956            href = objs.href
3957            if href is not None:
3958                writer.write_attribute('href', href)
3959        for obj in objs:
3960            GroupWriter.write_one(obj, writer, singular)
3961        writer.write_end()
class GuestOperatingSystemWriter(ovirtsdk4.writer.Writer):
3964class GuestOperatingSystemWriter(Writer):
3965
3966    def __init__(self):
3967        super(GuestOperatingSystemWriter, self).__init__()
3968
3969    @staticmethod
3970    def write_one(obj, writer, singular=None):
3971        if singular is None:
3972            singular = 'guest_operating_system'
3973        writer.write_start(singular)
3974        href = obj.href
3975        if href is not None:
3976            writer.write_attribute('href', href)
3977        if obj.architecture is not None:
3978            Writer.write_string(writer, 'architecture', obj.architecture)
3979        if obj.codename is not None:
3980            Writer.write_string(writer, 'codename', obj.codename)
3981        if obj.distribution is not None:
3982            Writer.write_string(writer, 'distribution', obj.distribution)
3983        if obj.family is not None:
3984            Writer.write_string(writer, 'family', obj.family)
3985        if obj.kernel is not None:
3986            KernelWriter.write_one(obj.kernel, writer, 'kernel')
3987        if obj.version is not None:
3988            VersionWriter.write_one(obj.version, writer, 'version')
3989        writer.write_end()
3990
3991    @staticmethod
3992    def write_many(objs, writer, singular=None, plural=None):
3993        if singular is None:
3994            singular = 'guest_operating_system'
3995        if plural is None:
3996            plural = 'guest_operating_systems'
3997        writer.write_start(plural)
3998        if type(objs) == List:
3999            href = objs.href
4000            if href is not None:
4001                writer.write_attribute('href', href)
4002        for obj in objs:
4003            GuestOperatingSystemWriter.write_one(obj, writer, singular)
4004        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

GuestOperatingSystemWriter()
3966    def __init__(self):
3967        super(GuestOperatingSystemWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
3969    @staticmethod
3970    def write_one(obj, writer, singular=None):
3971        if singular is None:
3972            singular = 'guest_operating_system'
3973        writer.write_start(singular)
3974        href = obj.href
3975        if href is not None:
3976            writer.write_attribute('href', href)
3977        if obj.architecture is not None:
3978            Writer.write_string(writer, 'architecture', obj.architecture)
3979        if obj.codename is not None:
3980            Writer.write_string(writer, 'codename', obj.codename)
3981        if obj.distribution is not None:
3982            Writer.write_string(writer, 'distribution', obj.distribution)
3983        if obj.family is not None:
3984            Writer.write_string(writer, 'family', obj.family)
3985        if obj.kernel is not None:
3986            KernelWriter.write_one(obj.kernel, writer, 'kernel')
3987        if obj.version is not None:
3988            VersionWriter.write_one(obj.version, writer, 'version')
3989        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
3991    @staticmethod
3992    def write_many(objs, writer, singular=None, plural=None):
3993        if singular is None:
3994            singular = 'guest_operating_system'
3995        if plural is None:
3996            plural = 'guest_operating_systems'
3997        writer.write_start(plural)
3998        if type(objs) == List:
3999            href = objs.href
4000            if href is not None:
4001                writer.write_attribute('href', href)
4002        for obj in objs:
4003            GuestOperatingSystemWriter.write_one(obj, writer, singular)
4004        writer.write_end()
class HardwareInformationWriter(ovirtsdk4.writer.Writer):
4007class HardwareInformationWriter(Writer):
4008
4009    def __init__(self):
4010        super(HardwareInformationWriter, self).__init__()
4011
4012    @staticmethod
4013    def write_one(obj, writer, singular=None):
4014        if singular is None:
4015            singular = 'hardware_information'
4016        writer.write_start(singular)
4017        href = obj.href
4018        if href is not None:
4019            writer.write_attribute('href', href)
4020        if obj.family is not None:
4021            Writer.write_string(writer, 'family', obj.family)
4022        if obj.manufacturer is not None:
4023            Writer.write_string(writer, 'manufacturer', obj.manufacturer)
4024        if obj.product_name is not None:
4025            Writer.write_string(writer, 'product_name', obj.product_name)
4026        if obj.serial_number is not None:
4027            Writer.write_string(writer, 'serial_number', obj.serial_number)
4028        if obj.supported_rng_sources is not None:
4029            writer.write_start('supported_rng_sources')
4030            for item in obj.supported_rng_sources:
4031                if item is not None:
4032                    Writer.write_string(writer, 'supported_rng_source', item.value)
4033            writer.write_end()
4034        if obj.uuid is not None:
4035            Writer.write_string(writer, 'uuid', obj.uuid)
4036        if obj.version is not None:
4037            Writer.write_string(writer, 'version', obj.version)
4038        writer.write_end()
4039
4040    @staticmethod
4041    def write_many(objs, writer, singular=None, plural=None):
4042        if singular is None:
4043            singular = 'hardware_information'
4044        if plural is None:
4045            plural = 'hardware_informations'
4046        writer.write_start(plural)
4047        if type(objs) == List:
4048            href = objs.href
4049            if href is not None:
4050                writer.write_attribute('href', href)
4051        for obj in objs:
4052            HardwareInformationWriter.write_one(obj, writer, singular)
4053        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

HardwareInformationWriter()
4009    def __init__(self):
4010        super(HardwareInformationWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4012    @staticmethod
4013    def write_one(obj, writer, singular=None):
4014        if singular is None:
4015            singular = 'hardware_information'
4016        writer.write_start(singular)
4017        href = obj.href
4018        if href is not None:
4019            writer.write_attribute('href', href)
4020        if obj.family is not None:
4021            Writer.write_string(writer, 'family', obj.family)
4022        if obj.manufacturer is not None:
4023            Writer.write_string(writer, 'manufacturer', obj.manufacturer)
4024        if obj.product_name is not None:
4025            Writer.write_string(writer, 'product_name', obj.product_name)
4026        if obj.serial_number is not None:
4027            Writer.write_string(writer, 'serial_number', obj.serial_number)
4028        if obj.supported_rng_sources is not None:
4029            writer.write_start('supported_rng_sources')
4030            for item in obj.supported_rng_sources:
4031                if item is not None:
4032                    Writer.write_string(writer, 'supported_rng_source', item.value)
4033            writer.write_end()
4034        if obj.uuid is not None:
4035            Writer.write_string(writer, 'uuid', obj.uuid)
4036        if obj.version is not None:
4037            Writer.write_string(writer, 'version', obj.version)
4038        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4040    @staticmethod
4041    def write_many(objs, writer, singular=None, plural=None):
4042        if singular is None:
4043            singular = 'hardware_information'
4044        if plural is None:
4045            plural = 'hardware_informations'
4046        writer.write_start(plural)
4047        if type(objs) == List:
4048            href = objs.href
4049            if href is not None:
4050                writer.write_attribute('href', href)
4051        for obj in objs:
4052            HardwareInformationWriter.write_one(obj, writer, singular)
4053        writer.write_end()
class HighAvailabilityWriter(ovirtsdk4.writer.Writer):
4056class HighAvailabilityWriter(Writer):
4057
4058    def __init__(self):
4059        super(HighAvailabilityWriter, self).__init__()
4060
4061    @staticmethod
4062    def write_one(obj, writer, singular=None):
4063        if singular is None:
4064            singular = 'high_availability'
4065        writer.write_start(singular)
4066        href = obj.href
4067        if href is not None:
4068            writer.write_attribute('href', href)
4069        if obj.enabled is not None:
4070            Writer.write_boolean(writer, 'enabled', obj.enabled)
4071        if obj.priority is not None:
4072            Writer.write_integer(writer, 'priority', obj.priority)
4073        writer.write_end()
4074
4075    @staticmethod
4076    def write_many(objs, writer, singular=None, plural=None):
4077        if singular is None:
4078            singular = 'high_availability'
4079        if plural is None:
4080            plural = 'high_availabilities'
4081        writer.write_start(plural)
4082        if type(objs) == List:
4083            href = objs.href
4084            if href is not None:
4085                writer.write_attribute('href', href)
4086        for obj in objs:
4087            HighAvailabilityWriter.write_one(obj, writer, singular)
4088        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

HighAvailabilityWriter()
4058    def __init__(self):
4059        super(HighAvailabilityWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4061    @staticmethod
4062    def write_one(obj, writer, singular=None):
4063        if singular is None:
4064            singular = 'high_availability'
4065        writer.write_start(singular)
4066        href = obj.href
4067        if href is not None:
4068            writer.write_attribute('href', href)
4069        if obj.enabled is not None:
4070            Writer.write_boolean(writer, 'enabled', obj.enabled)
4071        if obj.priority is not None:
4072            Writer.write_integer(writer, 'priority', obj.priority)
4073        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4075    @staticmethod
4076    def write_many(objs, writer, singular=None, plural=None):
4077        if singular is None:
4078            singular = 'high_availability'
4079        if plural is None:
4080            plural = 'high_availabilities'
4081        writer.write_start(plural)
4082        if type(objs) == List:
4083            href = objs.href
4084            if href is not None:
4085                writer.write_attribute('href', href)
4086        for obj in objs:
4087            HighAvailabilityWriter.write_one(obj, writer, singular)
4088        writer.write_end()
class HookWriter(ovirtsdk4.writer.Writer):
4091class HookWriter(Writer):
4092
4093    def __init__(self):
4094        super(HookWriter, self).__init__()
4095
4096    @staticmethod
4097    def write_one(obj, writer, singular=None):
4098        if singular is None:
4099            singular = 'hook'
4100        writer.write_start(singular)
4101        href = obj.href
4102        if href is not None:
4103            writer.write_attribute('href', href)
4104        if obj.id is not None:
4105            writer.write_attribute('id', obj.id)
4106        if obj.comment is not None:
4107            Writer.write_string(writer, 'comment', obj.comment)
4108        if obj.description is not None:
4109            Writer.write_string(writer, 'description', obj.description)
4110        if obj.event_name is not None:
4111            Writer.write_string(writer, 'event_name', obj.event_name)
4112        if obj.md5 is not None:
4113            Writer.write_string(writer, 'md5', obj.md5)
4114        if obj.name is not None:
4115            Writer.write_string(writer, 'name', obj.name)
4116        if obj.host is not None:
4117            HostWriter.write_one(obj.host, writer, 'host')
4118        writer.write_end()
4119
4120    @staticmethod
4121    def write_many(objs, writer, singular=None, plural=None):
4122        if singular is None:
4123            singular = 'hook'
4124        if plural is None:
4125            plural = 'hooks'
4126        writer.write_start(plural)
4127        if type(objs) == List:
4128            href = objs.href
4129            if href is not None:
4130                writer.write_attribute('href', href)
4131        for obj in objs:
4132            HookWriter.write_one(obj, writer, singular)
4133        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

HookWriter()
4093    def __init__(self):
4094        super(HookWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4096    @staticmethod
4097    def write_one(obj, writer, singular=None):
4098        if singular is None:
4099            singular = 'hook'
4100        writer.write_start(singular)
4101        href = obj.href
4102        if href is not None:
4103            writer.write_attribute('href', href)
4104        if obj.id is not None:
4105            writer.write_attribute('id', obj.id)
4106        if obj.comment is not None:
4107            Writer.write_string(writer, 'comment', obj.comment)
4108        if obj.description is not None:
4109            Writer.write_string(writer, 'description', obj.description)
4110        if obj.event_name is not None:
4111            Writer.write_string(writer, 'event_name', obj.event_name)
4112        if obj.md5 is not None:
4113            Writer.write_string(writer, 'md5', obj.md5)
4114        if obj.name is not None:
4115            Writer.write_string(writer, 'name', obj.name)
4116        if obj.host is not None:
4117            HostWriter.write_one(obj.host, writer, 'host')
4118        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4120    @staticmethod
4121    def write_many(objs, writer, singular=None, plural=None):
4122        if singular is None:
4123            singular = 'hook'
4124        if plural is None:
4125            plural = 'hooks'
4126        writer.write_start(plural)
4127        if type(objs) == List:
4128            href = objs.href
4129            if href is not None:
4130                writer.write_attribute('href', href)
4131        for obj in objs:
4132            HookWriter.write_one(obj, writer, singular)
4133        writer.write_end()
class HostWriter(ovirtsdk4.writer.Writer):
4136class HostWriter(Writer):
4137
4138    def __init__(self):
4139        super(HostWriter, self).__init__()
4140
4141    @staticmethod
4142    def write_one(obj, writer, singular=None):
4143        if singular is None:
4144            singular = 'host'
4145        writer.write_start(singular)
4146        href = obj.href
4147        if href is not None:
4148            writer.write_attribute('href', href)
4149        if obj.id is not None:
4150            writer.write_attribute('id', obj.id)
4151        if obj.address is not None:
4152            Writer.write_string(writer, 'address', obj.address)
4153        if obj.auto_numa_status is not None:
4154            Writer.write_string(writer, 'auto_numa_status', obj.auto_numa_status.value)
4155        if obj.certificate is not None:
4156            CertificateWriter.write_one(obj.certificate, writer, 'certificate')
4157        if obj.comment is not None:
4158            Writer.write_string(writer, 'comment', obj.comment)
4159        if obj.cpu is not None:
4160            CpuWriter.write_one(obj.cpu, writer, 'cpu')
4161        if obj.description is not None:
4162            Writer.write_string(writer, 'description', obj.description)
4163        if obj.device_passthrough is not None:
4164            HostDevicePassthroughWriter.write_one(obj.device_passthrough, writer, 'device_passthrough')
4165        if obj.display is not None:
4166            DisplayWriter.write_one(obj.display, writer, 'display')
4167        if obj.external_status is not None:
4168            Writer.write_string(writer, 'external_status', obj.external_status.value)
4169        if obj.hardware_information is not None:
4170            HardwareInformationWriter.write_one(obj.hardware_information, writer, 'hardware_information')
4171        if obj.hosted_engine is not None:
4172            HostedEngineWriter.write_one(obj.hosted_engine, writer, 'hosted_engine')
4173        if obj.iscsi is not None:
4174            IscsiDetailsWriter.write_one(obj.iscsi, writer, 'iscsi')
4175        if obj.kdump_status is not None:
4176            Writer.write_string(writer, 'kdump_status', obj.kdump_status.value)
4177        if obj.ksm is not None:
4178            KsmWriter.write_one(obj.ksm, writer, 'ksm')
4179        if obj.libvirt_version is not None:
4180            VersionWriter.write_one(obj.libvirt_version, writer, 'libvirt_version')
4181        if obj.max_scheduling_memory is not None:
4182            Writer.write_integer(writer, 'max_scheduling_memory', obj.max_scheduling_memory)
4183        if obj.memory is not None:
4184            Writer.write_integer(writer, 'memory', obj.memory)
4185        if obj.name is not None:
4186            Writer.write_string(writer, 'name', obj.name)
4187        if obj.network_operation_in_progress is not None:
4188            Writer.write_boolean(writer, 'network_operation_in_progress', obj.network_operation_in_progress)
4189        if obj.numa_supported is not None:
4190            Writer.write_boolean(writer, 'numa_supported', obj.numa_supported)
4191        if obj.os is not None:
4192            OperatingSystemWriter.write_one(obj.os, writer, 'os')
4193        if obj.override_iptables is not None:
4194            Writer.write_boolean(writer, 'override_iptables', obj.override_iptables)
4195        if obj.ovn_configured is not None:
4196            Writer.write_boolean(writer, 'ovn_configured', obj.ovn_configured)
4197        if obj.port is not None:
4198            Writer.write_integer(writer, 'port', obj.port)
4199        if obj.power_management is not None:
4200            PowerManagementWriter.write_one(obj.power_management, writer, 'power_management')
4201        if obj.protocol is not None:
4202            Writer.write_string(writer, 'protocol', obj.protocol.value)
4203        if obj.reinstallation_required is not None:
4204            Writer.write_boolean(writer, 'reinstallation_required', obj.reinstallation_required)
4205        if obj.root_password is not None:
4206            Writer.write_string(writer, 'root_password', obj.root_password)
4207        if obj.se_linux is not None:
4208            SeLinuxWriter.write_one(obj.se_linux, writer, 'se_linux')
4209        if obj.spm is not None:
4210            SpmWriter.write_one(obj.spm, writer, 'spm')
4211        if obj.ssh is not None:
4212            SshWriter.write_one(obj.ssh, writer, 'ssh')
4213        if obj.status is not None:
4214            Writer.write_string(writer, 'status', obj.status.value)
4215        if obj.status_detail is not None:
4216            Writer.write_string(writer, 'status_detail', obj.status_detail)
4217        if obj.summary is not None:
4218            VmSummaryWriter.write_one(obj.summary, writer, 'summary')
4219        if obj.transparent_huge_pages is not None:
4220            TransparentHugePagesWriter.write_one(obj.transparent_huge_pages, writer, 'transparent_hugepages')
4221        if obj.type is not None:
4222            Writer.write_string(writer, 'type', obj.type.value)
4223        if obj.update_available is not None:
4224            Writer.write_boolean(writer, 'update_available', obj.update_available)
4225        if obj.version is not None:
4226            VersionWriter.write_one(obj.version, writer, 'version')
4227        if obj.vgpu_placement is not None:
4228            Writer.write_string(writer, 'vgpu_placement', obj.vgpu_placement.value)
4229        if obj.affinity_labels is not None:
4230            AffinityLabelWriter.write_many(obj.affinity_labels, writer, 'affinity_label', 'affinity_labels')
4231        if obj.agents is not None:
4232            AgentWriter.write_many(obj.agents, writer, 'agent', 'agents')
4233        if obj.cluster is not None:
4234            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
4235        if obj.cpu_units is not None:
4236            HostCpuUnitWriter.write_many(obj.cpu_units, writer, 'host_cpu_unit', 'cpu_units')
4237        if obj.devices is not None:
4238            HostDeviceWriter.write_many(obj.devices, writer, 'host_device', 'devices')
4239        if obj.external_host_provider is not None:
4240            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
4241        if obj.external_network_provider_configurations is not None:
4242            ExternalNetworkProviderConfigurationWriter.write_many(obj.external_network_provider_configurations, writer, 'external_network_provider_configuration', 'external_network_provider_configurations')
4243        if obj.hooks is not None:
4244            HookWriter.write_many(obj.hooks, writer, 'hook', 'hooks')
4245        if obj.katello_errata is not None:
4246            KatelloErratumWriter.write_many(obj.katello_errata, writer, 'katello_erratum', 'katello_errata')
4247        if obj.network_attachments is not None:
4248            NetworkAttachmentWriter.write_many(obj.network_attachments, writer, 'network_attachment', 'network_attachments')
4249        if obj.nics is not None:
4250            HostNicWriter.write_many(obj.nics, writer, 'host_nic', 'nics')
4251        if obj.numa_nodes is not None:
4252            NumaNodeWriter.write_many(obj.numa_nodes, writer, 'host_numa_node', 'host_numa_nodes')
4253        if obj.permissions is not None:
4254            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
4255        if obj.statistics is not None:
4256            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
4257        if obj.storage_connection_extensions is not None:
4258            StorageConnectionExtensionWriter.write_many(obj.storage_connection_extensions, writer, 'storage_connection_extension', 'storage_connection_extensions')
4259        if obj.storages is not None:
4260            HostStorageWriter.write_many(obj.storages, writer, 'host_storage', 'storages')
4261        if obj.tags is not None:
4262            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
4263        if obj.unmanaged_networks is not None:
4264            UnmanagedNetworkWriter.write_many(obj.unmanaged_networks, writer, 'unmanaged_network', 'unmanaged_networks')
4265        writer.write_end()
4266
4267    @staticmethod
4268    def write_many(objs, writer, singular=None, plural=None):
4269        if singular is None:
4270            singular = 'host'
4271        if plural is None:
4272            plural = 'hosts'
4273        writer.write_start(plural)
4274        if type(objs) == List:
4275            href = objs.href
4276            if href is not None:
4277                writer.write_attribute('href', href)
4278        for obj in objs:
4279            HostWriter.write_one(obj, writer, singular)
4280        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

HostWriter()
4138    def __init__(self):
4139        super(HostWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4141    @staticmethod
4142    def write_one(obj, writer, singular=None):
4143        if singular is None:
4144            singular = 'host'
4145        writer.write_start(singular)
4146        href = obj.href
4147        if href is not None:
4148            writer.write_attribute('href', href)
4149        if obj.id is not None:
4150            writer.write_attribute('id', obj.id)
4151        if obj.address is not None:
4152            Writer.write_string(writer, 'address', obj.address)
4153        if obj.auto_numa_status is not None:
4154            Writer.write_string(writer, 'auto_numa_status', obj.auto_numa_status.value)
4155        if obj.certificate is not None:
4156            CertificateWriter.write_one(obj.certificate, writer, 'certificate')
4157        if obj.comment is not None:
4158            Writer.write_string(writer, 'comment', obj.comment)
4159        if obj.cpu is not None:
4160            CpuWriter.write_one(obj.cpu, writer, 'cpu')
4161        if obj.description is not None:
4162            Writer.write_string(writer, 'description', obj.description)
4163        if obj.device_passthrough is not None:
4164            HostDevicePassthroughWriter.write_one(obj.device_passthrough, writer, 'device_passthrough')
4165        if obj.display is not None:
4166            DisplayWriter.write_one(obj.display, writer, 'display')
4167        if obj.external_status is not None:
4168            Writer.write_string(writer, 'external_status', obj.external_status.value)
4169        if obj.hardware_information is not None:
4170            HardwareInformationWriter.write_one(obj.hardware_information, writer, 'hardware_information')
4171        if obj.hosted_engine is not None:
4172            HostedEngineWriter.write_one(obj.hosted_engine, writer, 'hosted_engine')
4173        if obj.iscsi is not None:
4174            IscsiDetailsWriter.write_one(obj.iscsi, writer, 'iscsi')
4175        if obj.kdump_status is not None:
4176            Writer.write_string(writer, 'kdump_status', obj.kdump_status.value)
4177        if obj.ksm is not None:
4178            KsmWriter.write_one(obj.ksm, writer, 'ksm')
4179        if obj.libvirt_version is not None:
4180            VersionWriter.write_one(obj.libvirt_version, writer, 'libvirt_version')
4181        if obj.max_scheduling_memory is not None:
4182            Writer.write_integer(writer, 'max_scheduling_memory', obj.max_scheduling_memory)
4183        if obj.memory is not None:
4184            Writer.write_integer(writer, 'memory', obj.memory)
4185        if obj.name is not None:
4186            Writer.write_string(writer, 'name', obj.name)
4187        if obj.network_operation_in_progress is not None:
4188            Writer.write_boolean(writer, 'network_operation_in_progress', obj.network_operation_in_progress)
4189        if obj.numa_supported is not None:
4190            Writer.write_boolean(writer, 'numa_supported', obj.numa_supported)
4191        if obj.os is not None:
4192            OperatingSystemWriter.write_one(obj.os, writer, 'os')
4193        if obj.override_iptables is not None:
4194            Writer.write_boolean(writer, 'override_iptables', obj.override_iptables)
4195        if obj.ovn_configured is not None:
4196            Writer.write_boolean(writer, 'ovn_configured', obj.ovn_configured)
4197        if obj.port is not None:
4198            Writer.write_integer(writer, 'port', obj.port)
4199        if obj.power_management is not None:
4200            PowerManagementWriter.write_one(obj.power_management, writer, 'power_management')
4201        if obj.protocol is not None:
4202            Writer.write_string(writer, 'protocol', obj.protocol.value)
4203        if obj.reinstallation_required is not None:
4204            Writer.write_boolean(writer, 'reinstallation_required', obj.reinstallation_required)
4205        if obj.root_password is not None:
4206            Writer.write_string(writer, 'root_password', obj.root_password)
4207        if obj.se_linux is not None:
4208            SeLinuxWriter.write_one(obj.se_linux, writer, 'se_linux')
4209        if obj.spm is not None:
4210            SpmWriter.write_one(obj.spm, writer, 'spm')
4211        if obj.ssh is not None:
4212            SshWriter.write_one(obj.ssh, writer, 'ssh')
4213        if obj.status is not None:
4214            Writer.write_string(writer, 'status', obj.status.value)
4215        if obj.status_detail is not None:
4216            Writer.write_string(writer, 'status_detail', obj.status_detail)
4217        if obj.summary is not None:
4218            VmSummaryWriter.write_one(obj.summary, writer, 'summary')
4219        if obj.transparent_huge_pages is not None:
4220            TransparentHugePagesWriter.write_one(obj.transparent_huge_pages, writer, 'transparent_hugepages')
4221        if obj.type is not None:
4222            Writer.write_string(writer, 'type', obj.type.value)
4223        if obj.update_available is not None:
4224            Writer.write_boolean(writer, 'update_available', obj.update_available)
4225        if obj.version is not None:
4226            VersionWriter.write_one(obj.version, writer, 'version')
4227        if obj.vgpu_placement is not None:
4228            Writer.write_string(writer, 'vgpu_placement', obj.vgpu_placement.value)
4229        if obj.affinity_labels is not None:
4230            AffinityLabelWriter.write_many(obj.affinity_labels, writer, 'affinity_label', 'affinity_labels')
4231        if obj.agents is not None:
4232            AgentWriter.write_many(obj.agents, writer, 'agent', 'agents')
4233        if obj.cluster is not None:
4234            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
4235        if obj.cpu_units is not None:
4236            HostCpuUnitWriter.write_many(obj.cpu_units, writer, 'host_cpu_unit', 'cpu_units')
4237        if obj.devices is not None:
4238            HostDeviceWriter.write_many(obj.devices, writer, 'host_device', 'devices')
4239        if obj.external_host_provider is not None:
4240            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
4241        if obj.external_network_provider_configurations is not None:
4242            ExternalNetworkProviderConfigurationWriter.write_many(obj.external_network_provider_configurations, writer, 'external_network_provider_configuration', 'external_network_provider_configurations')
4243        if obj.hooks is not None:
4244            HookWriter.write_many(obj.hooks, writer, 'hook', 'hooks')
4245        if obj.katello_errata is not None:
4246            KatelloErratumWriter.write_many(obj.katello_errata, writer, 'katello_erratum', 'katello_errata')
4247        if obj.network_attachments is not None:
4248            NetworkAttachmentWriter.write_many(obj.network_attachments, writer, 'network_attachment', 'network_attachments')
4249        if obj.nics is not None:
4250            HostNicWriter.write_many(obj.nics, writer, 'host_nic', 'nics')
4251        if obj.numa_nodes is not None:
4252            NumaNodeWriter.write_many(obj.numa_nodes, writer, 'host_numa_node', 'host_numa_nodes')
4253        if obj.permissions is not None:
4254            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
4255        if obj.statistics is not None:
4256            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
4257        if obj.storage_connection_extensions is not None:
4258            StorageConnectionExtensionWriter.write_many(obj.storage_connection_extensions, writer, 'storage_connection_extension', 'storage_connection_extensions')
4259        if obj.storages is not None:
4260            HostStorageWriter.write_many(obj.storages, writer, 'host_storage', 'storages')
4261        if obj.tags is not None:
4262            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
4263        if obj.unmanaged_networks is not None:
4264            UnmanagedNetworkWriter.write_many(obj.unmanaged_networks, writer, 'unmanaged_network', 'unmanaged_networks')
4265        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4267    @staticmethod
4268    def write_many(objs, writer, singular=None, plural=None):
4269        if singular is None:
4270            singular = 'host'
4271        if plural is None:
4272            plural = 'hosts'
4273        writer.write_start(plural)
4274        if type(objs) == List:
4275            href = objs.href
4276            if href is not None:
4277                writer.write_attribute('href', href)
4278        for obj in objs:
4279            HostWriter.write_one(obj, writer, singular)
4280        writer.write_end()
class HostCpuUnitWriter(ovirtsdk4.writer.Writer):
4283class HostCpuUnitWriter(Writer):
4284
4285    def __init__(self):
4286        super(HostCpuUnitWriter, self).__init__()
4287
4288    @staticmethod
4289    def write_one(obj, writer, singular=None):
4290        if singular is None:
4291            singular = 'host_cpu_unit'
4292        writer.write_start(singular)
4293        href = obj.href
4294        if href is not None:
4295            writer.write_attribute('href', href)
4296        if obj.id is not None:
4297            writer.write_attribute('id', obj.id)
4298        if obj.comment is not None:
4299            Writer.write_string(writer, 'comment', obj.comment)
4300        if obj.core_id is not None:
4301            Writer.write_integer(writer, 'core_id', obj.core_id)
4302        if obj.cpu_id is not None:
4303            Writer.write_integer(writer, 'cpu_id', obj.cpu_id)
4304        if obj.description is not None:
4305            Writer.write_string(writer, 'description', obj.description)
4306        if obj.name is not None:
4307            Writer.write_string(writer, 'name', obj.name)
4308        if obj.runs_vdsm is not None:
4309            Writer.write_boolean(writer, 'runs_vdsm', obj.runs_vdsm)
4310        if obj.socket_id is not None:
4311            Writer.write_integer(writer, 'socket_id', obj.socket_id)
4312        if obj.vms is not None:
4313            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
4314        writer.write_end()
4315
4316    @staticmethod
4317    def write_many(objs, writer, singular=None, plural=None):
4318        if singular is None:
4319            singular = 'host_cpu_unit'
4320        if plural is None:
4321            plural = 'host_cpu_units'
4322        writer.write_start(plural)
4323        if type(objs) == List:
4324            href = objs.href
4325            if href is not None:
4326                writer.write_attribute('href', href)
4327        for obj in objs:
4328            HostCpuUnitWriter.write_one(obj, writer, singular)
4329        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

HostCpuUnitWriter()
4285    def __init__(self):
4286        super(HostCpuUnitWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4288    @staticmethod
4289    def write_one(obj, writer, singular=None):
4290        if singular is None:
4291            singular = 'host_cpu_unit'
4292        writer.write_start(singular)
4293        href = obj.href
4294        if href is not None:
4295            writer.write_attribute('href', href)
4296        if obj.id is not None:
4297            writer.write_attribute('id', obj.id)
4298        if obj.comment is not None:
4299            Writer.write_string(writer, 'comment', obj.comment)
4300        if obj.core_id is not None:
4301            Writer.write_integer(writer, 'core_id', obj.core_id)
4302        if obj.cpu_id is not None:
4303            Writer.write_integer(writer, 'cpu_id', obj.cpu_id)
4304        if obj.description is not None:
4305            Writer.write_string(writer, 'description', obj.description)
4306        if obj.name is not None:
4307            Writer.write_string(writer, 'name', obj.name)
4308        if obj.runs_vdsm is not None:
4309            Writer.write_boolean(writer, 'runs_vdsm', obj.runs_vdsm)
4310        if obj.socket_id is not None:
4311            Writer.write_integer(writer, 'socket_id', obj.socket_id)
4312        if obj.vms is not None:
4313            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
4314        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4316    @staticmethod
4317    def write_many(objs, writer, singular=None, plural=None):
4318        if singular is None:
4319            singular = 'host_cpu_unit'
4320        if plural is None:
4321            plural = 'host_cpu_units'
4322        writer.write_start(plural)
4323        if type(objs) == List:
4324            href = objs.href
4325            if href is not None:
4326                writer.write_attribute('href', href)
4327        for obj in objs:
4328            HostCpuUnitWriter.write_one(obj, writer, singular)
4329        writer.write_end()
class HostDeviceWriter(ovirtsdk4.writer.Writer):
4332class HostDeviceWriter(Writer):
4333
4334    def __init__(self):
4335        super(HostDeviceWriter, self).__init__()
4336
4337    @staticmethod
4338    def write_one(obj, writer, singular=None):
4339        if singular is None:
4340            singular = 'host_device'
4341        writer.write_start(singular)
4342        href = obj.href
4343        if href is not None:
4344            writer.write_attribute('href', href)
4345        if obj.id is not None:
4346            writer.write_attribute('id', obj.id)
4347        if obj.capability is not None:
4348            Writer.write_string(writer, 'capability', obj.capability)
4349        if obj.comment is not None:
4350            Writer.write_string(writer, 'comment', obj.comment)
4351        if obj.description is not None:
4352            Writer.write_string(writer, 'description', obj.description)
4353        if obj.driver is not None:
4354            Writer.write_string(writer, 'driver', obj.driver)
4355        if obj.iommu_group is not None:
4356            Writer.write_integer(writer, 'iommu_group', obj.iommu_group)
4357        if obj.m_dev_types is not None:
4358            MDevTypeWriter.write_many(obj.m_dev_types, writer, 'm_dev_type', 'm_dev_types')
4359        if obj.name is not None:
4360            Writer.write_string(writer, 'name', obj.name)
4361        if obj.physical_function is not None:
4362            HostDeviceWriter.write_one(obj.physical_function, writer, 'physical_function')
4363        if obj.placeholder is not None:
4364            Writer.write_boolean(writer, 'placeholder', obj.placeholder)
4365        if obj.product is not None:
4366            ProductWriter.write_one(obj.product, writer, 'product')
4367        if obj.vendor is not None:
4368            VendorWriter.write_one(obj.vendor, writer, 'vendor')
4369        if obj.virtual_functions is not None:
4370            Writer.write_integer(writer, 'virtual_functions', obj.virtual_functions)
4371        if obj.host is not None:
4372            HostWriter.write_one(obj.host, writer, 'host')
4373        if obj.parent_device is not None:
4374            HostDeviceWriter.write_one(obj.parent_device, writer, 'parent_device')
4375        if obj.vm is not None:
4376            VmWriter.write_one(obj.vm, writer, 'vm')
4377        writer.write_end()
4378
4379    @staticmethod
4380    def write_many(objs, writer, singular=None, plural=None):
4381        if singular is None:
4382            singular = 'host_device'
4383        if plural is None:
4384            plural = 'host_devices'
4385        writer.write_start(plural)
4386        if type(objs) == List:
4387            href = objs.href
4388            if href is not None:
4389                writer.write_attribute('href', href)
4390        for obj in objs:
4391            HostDeviceWriter.write_one(obj, writer, singular)
4392        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

HostDeviceWriter()
4334    def __init__(self):
4335        super(HostDeviceWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4337    @staticmethod
4338    def write_one(obj, writer, singular=None):
4339        if singular is None:
4340            singular = 'host_device'
4341        writer.write_start(singular)
4342        href = obj.href
4343        if href is not None:
4344            writer.write_attribute('href', href)
4345        if obj.id is not None:
4346            writer.write_attribute('id', obj.id)
4347        if obj.capability is not None:
4348            Writer.write_string(writer, 'capability', obj.capability)
4349        if obj.comment is not None:
4350            Writer.write_string(writer, 'comment', obj.comment)
4351        if obj.description is not None:
4352            Writer.write_string(writer, 'description', obj.description)
4353        if obj.driver is not None:
4354            Writer.write_string(writer, 'driver', obj.driver)
4355        if obj.iommu_group is not None:
4356            Writer.write_integer(writer, 'iommu_group', obj.iommu_group)
4357        if obj.m_dev_types is not None:
4358            MDevTypeWriter.write_many(obj.m_dev_types, writer, 'm_dev_type', 'm_dev_types')
4359        if obj.name is not None:
4360            Writer.write_string(writer, 'name', obj.name)
4361        if obj.physical_function is not None:
4362            HostDeviceWriter.write_one(obj.physical_function, writer, 'physical_function')
4363        if obj.placeholder is not None:
4364            Writer.write_boolean(writer, 'placeholder', obj.placeholder)
4365        if obj.product is not None:
4366            ProductWriter.write_one(obj.product, writer, 'product')
4367        if obj.vendor is not None:
4368            VendorWriter.write_one(obj.vendor, writer, 'vendor')
4369        if obj.virtual_functions is not None:
4370            Writer.write_integer(writer, 'virtual_functions', obj.virtual_functions)
4371        if obj.host is not None:
4372            HostWriter.write_one(obj.host, writer, 'host')
4373        if obj.parent_device is not None:
4374            HostDeviceWriter.write_one(obj.parent_device, writer, 'parent_device')
4375        if obj.vm is not None:
4376            VmWriter.write_one(obj.vm, writer, 'vm')
4377        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4379    @staticmethod
4380    def write_many(objs, writer, singular=None, plural=None):
4381        if singular is None:
4382            singular = 'host_device'
4383        if plural is None:
4384            plural = 'host_devices'
4385        writer.write_start(plural)
4386        if type(objs) == List:
4387            href = objs.href
4388            if href is not None:
4389                writer.write_attribute('href', href)
4390        for obj in objs:
4391            HostDeviceWriter.write_one(obj, writer, singular)
4392        writer.write_end()
class HostDevicePassthroughWriter(ovirtsdk4.writer.Writer):
4395class HostDevicePassthroughWriter(Writer):
4396
4397    def __init__(self):
4398        super(HostDevicePassthroughWriter, self).__init__()
4399
4400    @staticmethod
4401    def write_one(obj, writer, singular=None):
4402        if singular is None:
4403            singular = 'host_device_passthrough'
4404        writer.write_start(singular)
4405        href = obj.href
4406        if href is not None:
4407            writer.write_attribute('href', href)
4408        if obj.enabled is not None:
4409            Writer.write_boolean(writer, 'enabled', obj.enabled)
4410        writer.write_end()
4411
4412    @staticmethod
4413    def write_many(objs, writer, singular=None, plural=None):
4414        if singular is None:
4415            singular = 'host_device_passthrough'
4416        if plural is None:
4417            plural = 'host_device_passthroughs'
4418        writer.write_start(plural)
4419        if type(objs) == List:
4420            href = objs.href
4421            if href is not None:
4422                writer.write_attribute('href', href)
4423        for obj in objs:
4424            HostDevicePassthroughWriter.write_one(obj, writer, singular)
4425        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

HostDevicePassthroughWriter()
4397    def __init__(self):
4398        super(HostDevicePassthroughWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4400    @staticmethod
4401    def write_one(obj, writer, singular=None):
4402        if singular is None:
4403            singular = 'host_device_passthrough'
4404        writer.write_start(singular)
4405        href = obj.href
4406        if href is not None:
4407            writer.write_attribute('href', href)
4408        if obj.enabled is not None:
4409            Writer.write_boolean(writer, 'enabled', obj.enabled)
4410        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4412    @staticmethod
4413    def write_many(objs, writer, singular=None, plural=None):
4414        if singular is None:
4415            singular = 'host_device_passthrough'
4416        if plural is None:
4417            plural = 'host_device_passthroughs'
4418        writer.write_start(plural)
4419        if type(objs) == List:
4420            href = objs.href
4421            if href is not None:
4422                writer.write_attribute('href', href)
4423        for obj in objs:
4424            HostDevicePassthroughWriter.write_one(obj, writer, singular)
4425        writer.write_end()
class HostNicWriter(ovirtsdk4.writer.Writer):
4428class HostNicWriter(Writer):
4429
4430    def __init__(self):
4431        super(HostNicWriter, self).__init__()
4432
4433    @staticmethod
4434    def write_one(obj, writer, singular=None):
4435        if singular is None:
4436            singular = 'host_nic'
4437        writer.write_start(singular)
4438        href = obj.href
4439        if href is not None:
4440            writer.write_attribute('href', href)
4441        if obj.id is not None:
4442            writer.write_attribute('id', obj.id)
4443        if obj.ad_aggregator_id is not None:
4444            Writer.write_integer(writer, 'ad_aggregator_id', obj.ad_aggregator_id)
4445        if obj.base_interface is not None:
4446            Writer.write_string(writer, 'base_interface', obj.base_interface)
4447        if obj.bonding is not None:
4448            BondingWriter.write_one(obj.bonding, writer, 'bonding')
4449        if obj.boot_protocol is not None:
4450            Writer.write_string(writer, 'boot_protocol', obj.boot_protocol.value)
4451        if obj.bridged is not None:
4452            Writer.write_boolean(writer, 'bridged', obj.bridged)
4453        if obj.check_connectivity is not None:
4454            Writer.write_boolean(writer, 'check_connectivity', obj.check_connectivity)
4455        if obj.comment is not None:
4456            Writer.write_string(writer, 'comment', obj.comment)
4457        if obj.custom_configuration is not None:
4458            Writer.write_boolean(writer, 'custom_configuration', obj.custom_configuration)
4459        if obj.description is not None:
4460            Writer.write_string(writer, 'description', obj.description)
4461        if obj.ip is not None:
4462            IpWriter.write_one(obj.ip, writer, 'ip')
4463        if obj.ipv6 is not None:
4464            IpWriter.write_one(obj.ipv6, writer, 'ipv6')
4465        if obj.ipv6_boot_protocol is not None:
4466            Writer.write_string(writer, 'ipv6_boot_protocol', obj.ipv6_boot_protocol.value)
4467        if obj.mac is not None:
4468            MacWriter.write_one(obj.mac, writer, 'mac')
4469        if obj.mtu is not None:
4470            Writer.write_integer(writer, 'mtu', obj.mtu)
4471        if obj.name is not None:
4472            Writer.write_string(writer, 'name', obj.name)
4473        if obj.override_configuration is not None:
4474            Writer.write_boolean(writer, 'override_configuration', obj.override_configuration)
4475        if obj.properties is not None:
4476            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
4477        if obj.speed is not None:
4478            Writer.write_integer(writer, 'speed', obj.speed)
4479        if obj.status is not None:
4480            Writer.write_string(writer, 'status', obj.status.value)
4481        if obj.virtual_functions_configuration is not None:
4482            HostNicVirtualFunctionsConfigurationWriter.write_one(obj.virtual_functions_configuration, writer, 'virtual_functions_configuration')
4483        if obj.vlan is not None:
4484            VlanWriter.write_one(obj.vlan, writer, 'vlan')
4485        if obj.host is not None:
4486            HostWriter.write_one(obj.host, writer, 'host')
4487        if obj.network is not None:
4488            NetworkWriter.write_one(obj.network, writer, 'network')
4489        if obj.network_labels is not None:
4490            NetworkLabelWriter.write_many(obj.network_labels, writer, 'network_label', 'network_labels')
4491        if obj.physical_function is not None:
4492            HostNicWriter.write_one(obj.physical_function, writer, 'physical_function')
4493        if obj.qos is not None:
4494            QosWriter.write_one(obj.qos, writer, 'qos')
4495        if obj.statistics is not None:
4496            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
4497        writer.write_end()
4498
4499    @staticmethod
4500    def write_many(objs, writer, singular=None, plural=None):
4501        if singular is None:
4502            singular = 'host_nic'
4503        if plural is None:
4504            plural = 'host_nics'
4505        writer.write_start(plural)
4506        if type(objs) == List:
4507            href = objs.href
4508            if href is not None:
4509                writer.write_attribute('href', href)
4510        for obj in objs:
4511            HostNicWriter.write_one(obj, writer, singular)
4512        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

HostNicWriter()
4430    def __init__(self):
4431        super(HostNicWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4433    @staticmethod
4434    def write_one(obj, writer, singular=None):
4435        if singular is None:
4436            singular = 'host_nic'
4437        writer.write_start(singular)
4438        href = obj.href
4439        if href is not None:
4440            writer.write_attribute('href', href)
4441        if obj.id is not None:
4442            writer.write_attribute('id', obj.id)
4443        if obj.ad_aggregator_id is not None:
4444            Writer.write_integer(writer, 'ad_aggregator_id', obj.ad_aggregator_id)
4445        if obj.base_interface is not None:
4446            Writer.write_string(writer, 'base_interface', obj.base_interface)
4447        if obj.bonding is not None:
4448            BondingWriter.write_one(obj.bonding, writer, 'bonding')
4449        if obj.boot_protocol is not None:
4450            Writer.write_string(writer, 'boot_protocol', obj.boot_protocol.value)
4451        if obj.bridged is not None:
4452            Writer.write_boolean(writer, 'bridged', obj.bridged)
4453        if obj.check_connectivity is not None:
4454            Writer.write_boolean(writer, 'check_connectivity', obj.check_connectivity)
4455        if obj.comment is not None:
4456            Writer.write_string(writer, 'comment', obj.comment)
4457        if obj.custom_configuration is not None:
4458            Writer.write_boolean(writer, 'custom_configuration', obj.custom_configuration)
4459        if obj.description is not None:
4460            Writer.write_string(writer, 'description', obj.description)
4461        if obj.ip is not None:
4462            IpWriter.write_one(obj.ip, writer, 'ip')
4463        if obj.ipv6 is not None:
4464            IpWriter.write_one(obj.ipv6, writer, 'ipv6')
4465        if obj.ipv6_boot_protocol is not None:
4466            Writer.write_string(writer, 'ipv6_boot_protocol', obj.ipv6_boot_protocol.value)
4467        if obj.mac is not None:
4468            MacWriter.write_one(obj.mac, writer, 'mac')
4469        if obj.mtu is not None:
4470            Writer.write_integer(writer, 'mtu', obj.mtu)
4471        if obj.name is not None:
4472            Writer.write_string(writer, 'name', obj.name)
4473        if obj.override_configuration is not None:
4474            Writer.write_boolean(writer, 'override_configuration', obj.override_configuration)
4475        if obj.properties is not None:
4476            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
4477        if obj.speed is not None:
4478            Writer.write_integer(writer, 'speed', obj.speed)
4479        if obj.status is not None:
4480            Writer.write_string(writer, 'status', obj.status.value)
4481        if obj.virtual_functions_configuration is not None:
4482            HostNicVirtualFunctionsConfigurationWriter.write_one(obj.virtual_functions_configuration, writer, 'virtual_functions_configuration')
4483        if obj.vlan is not None:
4484            VlanWriter.write_one(obj.vlan, writer, 'vlan')
4485        if obj.host is not None:
4486            HostWriter.write_one(obj.host, writer, 'host')
4487        if obj.network is not None:
4488            NetworkWriter.write_one(obj.network, writer, 'network')
4489        if obj.network_labels is not None:
4490            NetworkLabelWriter.write_many(obj.network_labels, writer, 'network_label', 'network_labels')
4491        if obj.physical_function is not None:
4492            HostNicWriter.write_one(obj.physical_function, writer, 'physical_function')
4493        if obj.qos is not None:
4494            QosWriter.write_one(obj.qos, writer, 'qos')
4495        if obj.statistics is not None:
4496            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
4497        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4499    @staticmethod
4500    def write_many(objs, writer, singular=None, plural=None):
4501        if singular is None:
4502            singular = 'host_nic'
4503        if plural is None:
4504            plural = 'host_nics'
4505        writer.write_start(plural)
4506        if type(objs) == List:
4507            href = objs.href
4508            if href is not None:
4509                writer.write_attribute('href', href)
4510        for obj in objs:
4511            HostNicWriter.write_one(obj, writer, singular)
4512        writer.write_end()
class HostNicVirtualFunctionsConfigurationWriter(ovirtsdk4.writer.Writer):
4515class HostNicVirtualFunctionsConfigurationWriter(Writer):
4516
4517    def __init__(self):
4518        super(HostNicVirtualFunctionsConfigurationWriter, self).__init__()
4519
4520    @staticmethod
4521    def write_one(obj, writer, singular=None):
4522        if singular is None:
4523            singular = 'host_nic_virtual_functions_configuration'
4524        writer.write_start(singular)
4525        href = obj.href
4526        if href is not None:
4527            writer.write_attribute('href', href)
4528        if obj.all_networks_allowed is not None:
4529            Writer.write_boolean(writer, 'all_networks_allowed', obj.all_networks_allowed)
4530        if obj.max_number_of_virtual_functions is not None:
4531            Writer.write_integer(writer, 'max_number_of_virtual_functions', obj.max_number_of_virtual_functions)
4532        if obj.number_of_virtual_functions is not None:
4533            Writer.write_integer(writer, 'number_of_virtual_functions', obj.number_of_virtual_functions)
4534        writer.write_end()
4535
4536    @staticmethod
4537    def write_many(objs, writer, singular=None, plural=None):
4538        if singular is None:
4539            singular = 'host_nic_virtual_functions_configuration'
4540        if plural is None:
4541            plural = 'host_nic_virtual_functions_configurations'
4542        writer.write_start(plural)
4543        if type(objs) == List:
4544            href = objs.href
4545            if href is not None:
4546                writer.write_attribute('href', href)
4547        for obj in objs:
4548            HostNicVirtualFunctionsConfigurationWriter.write_one(obj, writer, singular)
4549        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

HostNicVirtualFunctionsConfigurationWriter()
4517    def __init__(self):
4518        super(HostNicVirtualFunctionsConfigurationWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4520    @staticmethod
4521    def write_one(obj, writer, singular=None):
4522        if singular is None:
4523            singular = 'host_nic_virtual_functions_configuration'
4524        writer.write_start(singular)
4525        href = obj.href
4526        if href is not None:
4527            writer.write_attribute('href', href)
4528        if obj.all_networks_allowed is not None:
4529            Writer.write_boolean(writer, 'all_networks_allowed', obj.all_networks_allowed)
4530        if obj.max_number_of_virtual_functions is not None:
4531            Writer.write_integer(writer, 'max_number_of_virtual_functions', obj.max_number_of_virtual_functions)
4532        if obj.number_of_virtual_functions is not None:
4533            Writer.write_integer(writer, 'number_of_virtual_functions', obj.number_of_virtual_functions)
4534        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4536    @staticmethod
4537    def write_many(objs, writer, singular=None, plural=None):
4538        if singular is None:
4539            singular = 'host_nic_virtual_functions_configuration'
4540        if plural is None:
4541            plural = 'host_nic_virtual_functions_configurations'
4542        writer.write_start(plural)
4543        if type(objs) == List:
4544            href = objs.href
4545            if href is not None:
4546                writer.write_attribute('href', href)
4547        for obj in objs:
4548            HostNicVirtualFunctionsConfigurationWriter.write_one(obj, writer, singular)
4549        writer.write_end()
class HostStorageWriter(ovirtsdk4.writer.Writer):
4552class HostStorageWriter(Writer):
4553
4554    def __init__(self):
4555        super(HostStorageWriter, self).__init__()
4556
4557    @staticmethod
4558    def write_one(obj, writer, singular=None):
4559        if singular is None:
4560            singular = 'host_storage'
4561        writer.write_start(singular)
4562        href = obj.href
4563        if href is not None:
4564            writer.write_attribute('href', href)
4565        if obj.id is not None:
4566            writer.write_attribute('id', obj.id)
4567        if obj.address is not None:
4568            Writer.write_string(writer, 'address', obj.address)
4569        if obj.comment is not None:
4570            Writer.write_string(writer, 'comment', obj.comment)
4571        if obj.description is not None:
4572            Writer.write_string(writer, 'description', obj.description)
4573        if obj.driver_options is not None:
4574            PropertyWriter.write_many(obj.driver_options, writer, 'property', 'driver_options')
4575        if obj.driver_sensitive_options is not None:
4576            PropertyWriter.write_many(obj.driver_sensitive_options, writer, 'property', 'driver_sensitive_options')
4577        if obj.logical_units is not None:
4578            LogicalUnitWriter.write_many(obj.logical_units, writer, 'logical_unit', 'logical_units')
4579        if obj.mount_options is not None:
4580            Writer.write_string(writer, 'mount_options', obj.mount_options)
4581        if obj.name is not None:
4582            Writer.write_string(writer, 'name', obj.name)
4583        if obj.nfs_retrans is not None:
4584            Writer.write_integer(writer, 'nfs_retrans', obj.nfs_retrans)
4585        if obj.nfs_timeo is not None:
4586            Writer.write_integer(writer, 'nfs_timeo', obj.nfs_timeo)
4587        if obj.nfs_version is not None:
4588            Writer.write_string(writer, 'nfs_version', obj.nfs_version.value)
4589        if obj.override_luns is not None:
4590            Writer.write_boolean(writer, 'override_luns', obj.override_luns)
4591        if obj.password is not None:
4592            Writer.write_string(writer, 'password', obj.password)
4593        if obj.path is not None:
4594            Writer.write_string(writer, 'path', obj.path)
4595        if obj.port is not None:
4596            Writer.write_integer(writer, 'port', obj.port)
4597        if obj.portal is not None:
4598            Writer.write_string(writer, 'portal', obj.portal)
4599        if obj.target is not None:
4600            Writer.write_string(writer, 'target', obj.target)
4601        if obj.type is not None:
4602            Writer.write_string(writer, 'type', obj.type.value)
4603        if obj.username is not None:
4604            Writer.write_string(writer, 'username', obj.username)
4605        if obj.vfs_type is not None:
4606            Writer.write_string(writer, 'vfs_type', obj.vfs_type)
4607        if obj.volume_group is not None:
4608            VolumeGroupWriter.write_one(obj.volume_group, writer, 'volume_group')
4609        if obj.host is not None:
4610            HostWriter.write_one(obj.host, writer, 'host')
4611        writer.write_end()
4612
4613    @staticmethod
4614    def write_many(objs, writer, singular=None, plural=None):
4615        if singular is None:
4616            singular = 'host_storage'
4617        if plural is None:
4618            plural = 'host_storages'
4619        writer.write_start(plural)
4620        if type(objs) == List:
4621            href = objs.href
4622            if href is not None:
4623                writer.write_attribute('href', href)
4624        for obj in objs:
4625            HostStorageWriter.write_one(obj, writer, singular)
4626        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

HostStorageWriter()
4554    def __init__(self):
4555        super(HostStorageWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4557    @staticmethod
4558    def write_one(obj, writer, singular=None):
4559        if singular is None:
4560            singular = 'host_storage'
4561        writer.write_start(singular)
4562        href = obj.href
4563        if href is not None:
4564            writer.write_attribute('href', href)
4565        if obj.id is not None:
4566            writer.write_attribute('id', obj.id)
4567        if obj.address is not None:
4568            Writer.write_string(writer, 'address', obj.address)
4569        if obj.comment is not None:
4570            Writer.write_string(writer, 'comment', obj.comment)
4571        if obj.description is not None:
4572            Writer.write_string(writer, 'description', obj.description)
4573        if obj.driver_options is not None:
4574            PropertyWriter.write_many(obj.driver_options, writer, 'property', 'driver_options')
4575        if obj.driver_sensitive_options is not None:
4576            PropertyWriter.write_many(obj.driver_sensitive_options, writer, 'property', 'driver_sensitive_options')
4577        if obj.logical_units is not None:
4578            LogicalUnitWriter.write_many(obj.logical_units, writer, 'logical_unit', 'logical_units')
4579        if obj.mount_options is not None:
4580            Writer.write_string(writer, 'mount_options', obj.mount_options)
4581        if obj.name is not None:
4582            Writer.write_string(writer, 'name', obj.name)
4583        if obj.nfs_retrans is not None:
4584            Writer.write_integer(writer, 'nfs_retrans', obj.nfs_retrans)
4585        if obj.nfs_timeo is not None:
4586            Writer.write_integer(writer, 'nfs_timeo', obj.nfs_timeo)
4587        if obj.nfs_version is not None:
4588            Writer.write_string(writer, 'nfs_version', obj.nfs_version.value)
4589        if obj.override_luns is not None:
4590            Writer.write_boolean(writer, 'override_luns', obj.override_luns)
4591        if obj.password is not None:
4592            Writer.write_string(writer, 'password', obj.password)
4593        if obj.path is not None:
4594            Writer.write_string(writer, 'path', obj.path)
4595        if obj.port is not None:
4596            Writer.write_integer(writer, 'port', obj.port)
4597        if obj.portal is not None:
4598            Writer.write_string(writer, 'portal', obj.portal)
4599        if obj.target is not None:
4600            Writer.write_string(writer, 'target', obj.target)
4601        if obj.type is not None:
4602            Writer.write_string(writer, 'type', obj.type.value)
4603        if obj.username is not None:
4604            Writer.write_string(writer, 'username', obj.username)
4605        if obj.vfs_type is not None:
4606            Writer.write_string(writer, 'vfs_type', obj.vfs_type)
4607        if obj.volume_group is not None:
4608            VolumeGroupWriter.write_one(obj.volume_group, writer, 'volume_group')
4609        if obj.host is not None:
4610            HostWriter.write_one(obj.host, writer, 'host')
4611        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4613    @staticmethod
4614    def write_many(objs, writer, singular=None, plural=None):
4615        if singular is None:
4616            singular = 'host_storage'
4617        if plural is None:
4618            plural = 'host_storages'
4619        writer.write_start(plural)
4620        if type(objs) == List:
4621            href = objs.href
4622            if href is not None:
4623                writer.write_attribute('href', href)
4624        for obj in objs:
4625            HostStorageWriter.write_one(obj, writer, singular)
4626        writer.write_end()
class HostedEngineWriter(ovirtsdk4.writer.Writer):
4629class HostedEngineWriter(Writer):
4630
4631    def __init__(self):
4632        super(HostedEngineWriter, self).__init__()
4633
4634    @staticmethod
4635    def write_one(obj, writer, singular=None):
4636        if singular is None:
4637            singular = 'hosted_engine'
4638        writer.write_start(singular)
4639        href = obj.href
4640        if href is not None:
4641            writer.write_attribute('href', href)
4642        if obj.active is not None:
4643            Writer.write_boolean(writer, 'active', obj.active)
4644        if obj.configured is not None:
4645            Writer.write_boolean(writer, 'configured', obj.configured)
4646        if obj.global_maintenance is not None:
4647            Writer.write_boolean(writer, 'global_maintenance', obj.global_maintenance)
4648        if obj.local_maintenance is not None:
4649            Writer.write_boolean(writer, 'local_maintenance', obj.local_maintenance)
4650        if obj.score is not None:
4651            Writer.write_integer(writer, 'score', obj.score)
4652        writer.write_end()
4653
4654    @staticmethod
4655    def write_many(objs, writer, singular=None, plural=None):
4656        if singular is None:
4657            singular = 'hosted_engine'
4658        if plural is None:
4659            plural = 'hosted_engines'
4660        writer.write_start(plural)
4661        if type(objs) == List:
4662            href = objs.href
4663            if href is not None:
4664                writer.write_attribute('href', href)
4665        for obj in objs:
4666            HostedEngineWriter.write_one(obj, writer, singular)
4667        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

HostedEngineWriter()
4631    def __init__(self):
4632        super(HostedEngineWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4634    @staticmethod
4635    def write_one(obj, writer, singular=None):
4636        if singular is None:
4637            singular = 'hosted_engine'
4638        writer.write_start(singular)
4639        href = obj.href
4640        if href is not None:
4641            writer.write_attribute('href', href)
4642        if obj.active is not None:
4643            Writer.write_boolean(writer, 'active', obj.active)
4644        if obj.configured is not None:
4645            Writer.write_boolean(writer, 'configured', obj.configured)
4646        if obj.global_maintenance is not None:
4647            Writer.write_boolean(writer, 'global_maintenance', obj.global_maintenance)
4648        if obj.local_maintenance is not None:
4649            Writer.write_boolean(writer, 'local_maintenance', obj.local_maintenance)
4650        if obj.score is not None:
4651            Writer.write_integer(writer, 'score', obj.score)
4652        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4654    @staticmethod
4655    def write_many(objs, writer, singular=None, plural=None):
4656        if singular is None:
4657            singular = 'hosted_engine'
4658        if plural is None:
4659            plural = 'hosted_engines'
4660        writer.write_start(plural)
4661        if type(objs) == List:
4662            href = objs.href
4663            if href is not None:
4664                writer.write_attribute('href', href)
4665        for obj in objs:
4666            HostedEngineWriter.write_one(obj, writer, singular)
4667        writer.write_end()
class IconWriter(ovirtsdk4.writer.Writer):
4670class IconWriter(Writer):
4671
4672    def __init__(self):
4673        super(IconWriter, self).__init__()
4674
4675    @staticmethod
4676    def write_one(obj, writer, singular=None):
4677        if singular is None:
4678            singular = 'icon'
4679        writer.write_start(singular)
4680        href = obj.href
4681        if href is not None:
4682            writer.write_attribute('href', href)
4683        if obj.id is not None:
4684            writer.write_attribute('id', obj.id)
4685        if obj.comment is not None:
4686            Writer.write_string(writer, 'comment', obj.comment)
4687        if obj.data is not None:
4688            Writer.write_string(writer, 'data', obj.data)
4689        if obj.description is not None:
4690            Writer.write_string(writer, 'description', obj.description)
4691        if obj.media_type is not None:
4692            Writer.write_string(writer, 'media_type', obj.media_type)
4693        if obj.name is not None:
4694            Writer.write_string(writer, 'name', obj.name)
4695        writer.write_end()
4696
4697    @staticmethod
4698    def write_many(objs, writer, singular=None, plural=None):
4699        if singular is None:
4700            singular = 'icon'
4701        if plural is None:
4702            plural = 'icons'
4703        writer.write_start(plural)
4704        if type(objs) == List:
4705            href = objs.href
4706            if href is not None:
4707                writer.write_attribute('href', href)
4708        for obj in objs:
4709            IconWriter.write_one(obj, writer, singular)
4710        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

IconWriter()
4672    def __init__(self):
4673        super(IconWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4675    @staticmethod
4676    def write_one(obj, writer, singular=None):
4677        if singular is None:
4678            singular = 'icon'
4679        writer.write_start(singular)
4680        href = obj.href
4681        if href is not None:
4682            writer.write_attribute('href', href)
4683        if obj.id is not None:
4684            writer.write_attribute('id', obj.id)
4685        if obj.comment is not None:
4686            Writer.write_string(writer, 'comment', obj.comment)
4687        if obj.data is not None:
4688            Writer.write_string(writer, 'data', obj.data)
4689        if obj.description is not None:
4690            Writer.write_string(writer, 'description', obj.description)
4691        if obj.media_type is not None:
4692            Writer.write_string(writer, 'media_type', obj.media_type)
4693        if obj.name is not None:
4694            Writer.write_string(writer, 'name', obj.name)
4695        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4697    @staticmethod
4698    def write_many(objs, writer, singular=None, plural=None):
4699        if singular is None:
4700            singular = 'icon'
4701        if plural is None:
4702            plural = 'icons'
4703        writer.write_start(plural)
4704        if type(objs) == List:
4705            href = objs.href
4706            if href is not None:
4707                writer.write_attribute('href', href)
4708        for obj in objs:
4709            IconWriter.write_one(obj, writer, singular)
4710        writer.write_end()
class IdentifiedWriter(ovirtsdk4.writer.Writer):
4713class IdentifiedWriter(Writer):
4714
4715    def __init__(self):
4716        super(IdentifiedWriter, self).__init__()
4717
4718    @staticmethod
4719    def write_one(obj, writer, singular=None):
4720        if singular is None:
4721            singular = 'identified'
4722        writer.write_start(singular)
4723        href = obj.href
4724        if href is not None:
4725            writer.write_attribute('href', href)
4726        if obj.id is not None:
4727            writer.write_attribute('id', obj.id)
4728        if obj.comment is not None:
4729            Writer.write_string(writer, 'comment', obj.comment)
4730        if obj.description is not None:
4731            Writer.write_string(writer, 'description', obj.description)
4732        if obj.name is not None:
4733            Writer.write_string(writer, 'name', obj.name)
4734        writer.write_end()
4735
4736    @staticmethod
4737    def write_many(objs, writer, singular=None, plural=None):
4738        if singular is None:
4739            singular = 'identified'
4740        if plural is None:
4741            plural = 'identifieds'
4742        writer.write_start(plural)
4743        if type(objs) == List:
4744            href = objs.href
4745            if href is not None:
4746                writer.write_attribute('href', href)
4747        for obj in objs:
4748            IdentifiedWriter.write_one(obj, writer, singular)
4749        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

IdentifiedWriter()
4715    def __init__(self):
4716        super(IdentifiedWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4718    @staticmethod
4719    def write_one(obj, writer, singular=None):
4720        if singular is None:
4721            singular = 'identified'
4722        writer.write_start(singular)
4723        href = obj.href
4724        if href is not None:
4725            writer.write_attribute('href', href)
4726        if obj.id is not None:
4727            writer.write_attribute('id', obj.id)
4728        if obj.comment is not None:
4729            Writer.write_string(writer, 'comment', obj.comment)
4730        if obj.description is not None:
4731            Writer.write_string(writer, 'description', obj.description)
4732        if obj.name is not None:
4733            Writer.write_string(writer, 'name', obj.name)
4734        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4736    @staticmethod
4737    def write_many(objs, writer, singular=None, plural=None):
4738        if singular is None:
4739            singular = 'identified'
4740        if plural is None:
4741            plural = 'identifieds'
4742        writer.write_start(plural)
4743        if type(objs) == List:
4744            href = objs.href
4745            if href is not None:
4746                writer.write_attribute('href', href)
4747        for obj in objs:
4748            IdentifiedWriter.write_one(obj, writer, singular)
4749        writer.write_end()
class ImageWriter(ovirtsdk4.writer.Writer):
4752class ImageWriter(Writer):
4753
4754    def __init__(self):
4755        super(ImageWriter, self).__init__()
4756
4757    @staticmethod
4758    def write_one(obj, writer, singular=None):
4759        if singular is None:
4760            singular = 'image'
4761        writer.write_start(singular)
4762        href = obj.href
4763        if href is not None:
4764            writer.write_attribute('href', href)
4765        if obj.id is not None:
4766            writer.write_attribute('id', obj.id)
4767        if obj.comment is not None:
4768            Writer.write_string(writer, 'comment', obj.comment)
4769        if obj.description is not None:
4770            Writer.write_string(writer, 'description', obj.description)
4771        if obj.name is not None:
4772            Writer.write_string(writer, 'name', obj.name)
4773        if obj.size is not None:
4774            Writer.write_integer(writer, 'size', obj.size)
4775        if obj.type is not None:
4776            Writer.write_string(writer, 'type', obj.type.value)
4777        if obj.storage_domain is not None:
4778            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
4779        writer.write_end()
4780
4781    @staticmethod
4782    def write_many(objs, writer, singular=None, plural=None):
4783        if singular is None:
4784            singular = 'image'
4785        if plural is None:
4786            plural = 'images'
4787        writer.write_start(plural)
4788        if type(objs) == List:
4789            href = objs.href
4790            if href is not None:
4791                writer.write_attribute('href', href)
4792        for obj in objs:
4793            ImageWriter.write_one(obj, writer, singular)
4794        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ImageWriter()
4754    def __init__(self):
4755        super(ImageWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4757    @staticmethod
4758    def write_one(obj, writer, singular=None):
4759        if singular is None:
4760            singular = 'image'
4761        writer.write_start(singular)
4762        href = obj.href
4763        if href is not None:
4764            writer.write_attribute('href', href)
4765        if obj.id is not None:
4766            writer.write_attribute('id', obj.id)
4767        if obj.comment is not None:
4768            Writer.write_string(writer, 'comment', obj.comment)
4769        if obj.description is not None:
4770            Writer.write_string(writer, 'description', obj.description)
4771        if obj.name is not None:
4772            Writer.write_string(writer, 'name', obj.name)
4773        if obj.size is not None:
4774            Writer.write_integer(writer, 'size', obj.size)
4775        if obj.type is not None:
4776            Writer.write_string(writer, 'type', obj.type.value)
4777        if obj.storage_domain is not None:
4778            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
4779        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4781    @staticmethod
4782    def write_many(objs, writer, singular=None, plural=None):
4783        if singular is None:
4784            singular = 'image'
4785        if plural is None:
4786            plural = 'images'
4787        writer.write_start(plural)
4788        if type(objs) == List:
4789            href = objs.href
4790            if href is not None:
4791                writer.write_attribute('href', href)
4792        for obj in objs:
4793            ImageWriter.write_one(obj, writer, singular)
4794        writer.write_end()
class ImageTransferWriter(ovirtsdk4.writer.Writer):
4797class ImageTransferWriter(Writer):
4798
4799    def __init__(self):
4800        super(ImageTransferWriter, self).__init__()
4801
4802    @staticmethod
4803    def write_one(obj, writer, singular=None):
4804        if singular is None:
4805            singular = 'image_transfer'
4806        writer.write_start(singular)
4807        href = obj.href
4808        if href is not None:
4809            writer.write_attribute('href', href)
4810        if obj.id is not None:
4811            writer.write_attribute('id', obj.id)
4812        if obj.active is not None:
4813            Writer.write_boolean(writer, 'active', obj.active)
4814        if obj.comment is not None:
4815            Writer.write_string(writer, 'comment', obj.comment)
4816        if obj.description is not None:
4817            Writer.write_string(writer, 'description', obj.description)
4818        if obj.direction is not None:
4819            Writer.write_string(writer, 'direction', obj.direction.value)
4820        if obj.format is not None:
4821            Writer.write_string(writer, 'format', obj.format.value)
4822        if obj.inactivity_timeout is not None:
4823            Writer.write_integer(writer, 'inactivity_timeout', obj.inactivity_timeout)
4824        if obj.name is not None:
4825            Writer.write_string(writer, 'name', obj.name)
4826        if obj.phase is not None:
4827            Writer.write_string(writer, 'phase', obj.phase.value)
4828        if obj.proxy_url is not None:
4829            Writer.write_string(writer, 'proxy_url', obj.proxy_url)
4830        if obj.shallow is not None:
4831            Writer.write_boolean(writer, 'shallow', obj.shallow)
4832        if obj.timeout_policy is not None:
4833            Writer.write_string(writer, 'timeout_policy', obj.timeout_policy.value)
4834        if obj.transfer_url is not None:
4835            Writer.write_string(writer, 'transfer_url', obj.transfer_url)
4836        if obj.transferred is not None:
4837            Writer.write_integer(writer, 'transferred', obj.transferred)
4838        if obj.backup is not None:
4839            BackupWriter.write_one(obj.backup, writer, 'backup')
4840        if obj.disk is not None:
4841            DiskWriter.write_one(obj.disk, writer, 'disk')
4842        if obj.host is not None:
4843            HostWriter.write_one(obj.host, writer, 'host')
4844        if obj.image is not None:
4845            ImageWriter.write_one(obj.image, writer, 'image')
4846        if obj.snapshot is not None:
4847            DiskSnapshotWriter.write_one(obj.snapshot, writer, 'snapshot')
4848        writer.write_end()
4849
4850    @staticmethod
4851    def write_many(objs, writer, singular=None, plural=None):
4852        if singular is None:
4853            singular = 'image_transfer'
4854        if plural is None:
4855            plural = 'image_transfers'
4856        writer.write_start(plural)
4857        if type(objs) == List:
4858            href = objs.href
4859            if href is not None:
4860                writer.write_attribute('href', href)
4861        for obj in objs:
4862            ImageTransferWriter.write_one(obj, writer, singular)
4863        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ImageTransferWriter()
4799    def __init__(self):
4800        super(ImageTransferWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4802    @staticmethod
4803    def write_one(obj, writer, singular=None):
4804        if singular is None:
4805            singular = 'image_transfer'
4806        writer.write_start(singular)
4807        href = obj.href
4808        if href is not None:
4809            writer.write_attribute('href', href)
4810        if obj.id is not None:
4811            writer.write_attribute('id', obj.id)
4812        if obj.active is not None:
4813            Writer.write_boolean(writer, 'active', obj.active)
4814        if obj.comment is not None:
4815            Writer.write_string(writer, 'comment', obj.comment)
4816        if obj.description is not None:
4817            Writer.write_string(writer, 'description', obj.description)
4818        if obj.direction is not None:
4819            Writer.write_string(writer, 'direction', obj.direction.value)
4820        if obj.format is not None:
4821            Writer.write_string(writer, 'format', obj.format.value)
4822        if obj.inactivity_timeout is not None:
4823            Writer.write_integer(writer, 'inactivity_timeout', obj.inactivity_timeout)
4824        if obj.name is not None:
4825            Writer.write_string(writer, 'name', obj.name)
4826        if obj.phase is not None:
4827            Writer.write_string(writer, 'phase', obj.phase.value)
4828        if obj.proxy_url is not None:
4829            Writer.write_string(writer, 'proxy_url', obj.proxy_url)
4830        if obj.shallow is not None:
4831            Writer.write_boolean(writer, 'shallow', obj.shallow)
4832        if obj.timeout_policy is not None:
4833            Writer.write_string(writer, 'timeout_policy', obj.timeout_policy.value)
4834        if obj.transfer_url is not None:
4835            Writer.write_string(writer, 'transfer_url', obj.transfer_url)
4836        if obj.transferred is not None:
4837            Writer.write_integer(writer, 'transferred', obj.transferred)
4838        if obj.backup is not None:
4839            BackupWriter.write_one(obj.backup, writer, 'backup')
4840        if obj.disk is not None:
4841            DiskWriter.write_one(obj.disk, writer, 'disk')
4842        if obj.host is not None:
4843            HostWriter.write_one(obj.host, writer, 'host')
4844        if obj.image is not None:
4845            ImageWriter.write_one(obj.image, writer, 'image')
4846        if obj.snapshot is not None:
4847            DiskSnapshotWriter.write_one(obj.snapshot, writer, 'snapshot')
4848        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4850    @staticmethod
4851    def write_many(objs, writer, singular=None, plural=None):
4852        if singular is None:
4853            singular = 'image_transfer'
4854        if plural is None:
4855            plural = 'image_transfers'
4856        writer.write_start(plural)
4857        if type(objs) == List:
4858            href = objs.href
4859            if href is not None:
4860                writer.write_attribute('href', href)
4861        for obj in objs:
4862            ImageTransferWriter.write_one(obj, writer, singular)
4863        writer.write_end()
class InitializationWriter(ovirtsdk4.writer.Writer):
4866class InitializationWriter(Writer):
4867
4868    def __init__(self):
4869        super(InitializationWriter, self).__init__()
4870
4871    @staticmethod
4872    def write_one(obj, writer, singular=None):
4873        if singular is None:
4874            singular = 'initialization'
4875        writer.write_start(singular)
4876        href = obj.href
4877        if href is not None:
4878            writer.write_attribute('href', href)
4879        if obj.active_directory_ou is not None:
4880            Writer.write_string(writer, 'active_directory_ou', obj.active_directory_ou)
4881        if obj.authorized_ssh_keys is not None:
4882            Writer.write_string(writer, 'authorized_ssh_keys', obj.authorized_ssh_keys)
4883        if obj.cloud_init is not None:
4884            CloudInitWriter.write_one(obj.cloud_init, writer, 'cloud_init')
4885        if obj.cloud_init_network_protocol is not None:
4886            Writer.write_string(writer, 'cloud_init_network_protocol', obj.cloud_init_network_protocol.value)
4887        if obj.configuration is not None:
4888            ConfigurationWriter.write_one(obj.configuration, writer, 'configuration')
4889        if obj.custom_script is not None:
4890            Writer.write_string(writer, 'custom_script', obj.custom_script)
4891        if obj.dns_search is not None:
4892            Writer.write_string(writer, 'dns_search', obj.dns_search)
4893        if obj.dns_servers is not None:
4894            Writer.write_string(writer, 'dns_servers', obj.dns_servers)
4895        if obj.domain is not None:
4896            Writer.write_string(writer, 'domain', obj.domain)
4897        if obj.host_name is not None:
4898            Writer.write_string(writer, 'host_name', obj.host_name)
4899        if obj.input_locale is not None:
4900            Writer.write_string(writer, 'input_locale', obj.input_locale)
4901        if obj.nic_configurations is not None:
4902            NicConfigurationWriter.write_many(obj.nic_configurations, writer, 'nic_configuration', 'nic_configurations')
4903        if obj.org_name is not None:
4904            Writer.write_string(writer, 'org_name', obj.org_name)
4905        if obj.regenerate_ids is not None:
4906            Writer.write_boolean(writer, 'regenerate_ids', obj.regenerate_ids)
4907        if obj.regenerate_ssh_keys is not None:
4908            Writer.write_boolean(writer, 'regenerate_ssh_keys', obj.regenerate_ssh_keys)
4909        if obj.root_password is not None:
4910            Writer.write_string(writer, 'root_password', obj.root_password)
4911        if obj.system_locale is not None:
4912            Writer.write_string(writer, 'system_locale', obj.system_locale)
4913        if obj.timezone is not None:
4914            Writer.write_string(writer, 'timezone', obj.timezone)
4915        if obj.ui_language is not None:
4916            Writer.write_string(writer, 'ui_language', obj.ui_language)
4917        if obj.user_locale is not None:
4918            Writer.write_string(writer, 'user_locale', obj.user_locale)
4919        if obj.user_name is not None:
4920            Writer.write_string(writer, 'user_name', obj.user_name)
4921        if obj.windows_license_key is not None:
4922            Writer.write_string(writer, 'windows_license_key', obj.windows_license_key)
4923        writer.write_end()
4924
4925    @staticmethod
4926    def write_many(objs, writer, singular=None, plural=None):
4927        if singular is None:
4928            singular = 'initialization'
4929        if plural is None:
4930            plural = 'initializations'
4931        writer.write_start(plural)
4932        if type(objs) == List:
4933            href = objs.href
4934            if href is not None:
4935                writer.write_attribute('href', href)
4936        for obj in objs:
4937            InitializationWriter.write_one(obj, writer, singular)
4938        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

InitializationWriter()
4868    def __init__(self):
4869        super(InitializationWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4871    @staticmethod
4872    def write_one(obj, writer, singular=None):
4873        if singular is None:
4874            singular = 'initialization'
4875        writer.write_start(singular)
4876        href = obj.href
4877        if href is not None:
4878            writer.write_attribute('href', href)
4879        if obj.active_directory_ou is not None:
4880            Writer.write_string(writer, 'active_directory_ou', obj.active_directory_ou)
4881        if obj.authorized_ssh_keys is not None:
4882            Writer.write_string(writer, 'authorized_ssh_keys', obj.authorized_ssh_keys)
4883        if obj.cloud_init is not None:
4884            CloudInitWriter.write_one(obj.cloud_init, writer, 'cloud_init')
4885        if obj.cloud_init_network_protocol is not None:
4886            Writer.write_string(writer, 'cloud_init_network_protocol', obj.cloud_init_network_protocol.value)
4887        if obj.configuration is not None:
4888            ConfigurationWriter.write_one(obj.configuration, writer, 'configuration')
4889        if obj.custom_script is not None:
4890            Writer.write_string(writer, 'custom_script', obj.custom_script)
4891        if obj.dns_search is not None:
4892            Writer.write_string(writer, 'dns_search', obj.dns_search)
4893        if obj.dns_servers is not None:
4894            Writer.write_string(writer, 'dns_servers', obj.dns_servers)
4895        if obj.domain is not None:
4896            Writer.write_string(writer, 'domain', obj.domain)
4897        if obj.host_name is not None:
4898            Writer.write_string(writer, 'host_name', obj.host_name)
4899        if obj.input_locale is not None:
4900            Writer.write_string(writer, 'input_locale', obj.input_locale)
4901        if obj.nic_configurations is not None:
4902            NicConfigurationWriter.write_many(obj.nic_configurations, writer, 'nic_configuration', 'nic_configurations')
4903        if obj.org_name is not None:
4904            Writer.write_string(writer, 'org_name', obj.org_name)
4905        if obj.regenerate_ids is not None:
4906            Writer.write_boolean(writer, 'regenerate_ids', obj.regenerate_ids)
4907        if obj.regenerate_ssh_keys is not None:
4908            Writer.write_boolean(writer, 'regenerate_ssh_keys', obj.regenerate_ssh_keys)
4909        if obj.root_password is not None:
4910            Writer.write_string(writer, 'root_password', obj.root_password)
4911        if obj.system_locale is not None:
4912            Writer.write_string(writer, 'system_locale', obj.system_locale)
4913        if obj.timezone is not None:
4914            Writer.write_string(writer, 'timezone', obj.timezone)
4915        if obj.ui_language is not None:
4916            Writer.write_string(writer, 'ui_language', obj.ui_language)
4917        if obj.user_locale is not None:
4918            Writer.write_string(writer, 'user_locale', obj.user_locale)
4919        if obj.user_name is not None:
4920            Writer.write_string(writer, 'user_name', obj.user_name)
4921        if obj.windows_license_key is not None:
4922            Writer.write_string(writer, 'windows_license_key', obj.windows_license_key)
4923        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
4925    @staticmethod
4926    def write_many(objs, writer, singular=None, plural=None):
4927        if singular is None:
4928            singular = 'initialization'
4929        if plural is None:
4930            plural = 'initializations'
4931        writer.write_start(plural)
4932        if type(objs) == List:
4933            href = objs.href
4934            if href is not None:
4935                writer.write_attribute('href', href)
4936        for obj in objs:
4937            InitializationWriter.write_one(obj, writer, singular)
4938        writer.write_end()
class InstanceTypeWriter(ovirtsdk4.writer.Writer):
4941class InstanceTypeWriter(Writer):
4942
4943    def __init__(self):
4944        super(InstanceTypeWriter, self).__init__()
4945
4946    @staticmethod
4947    def write_one(obj, writer, singular=None):
4948        if singular is None:
4949            singular = 'instance_type'
4950        writer.write_start(singular)
4951        href = obj.href
4952        if href is not None:
4953            writer.write_attribute('href', href)
4954        if obj.id is not None:
4955            writer.write_attribute('id', obj.id)
4956        if obj.auto_pinning_policy is not None:
4957            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
4958        if obj.bios is not None:
4959            BiosWriter.write_one(obj.bios, writer, 'bios')
4960        if obj.comment is not None:
4961            Writer.write_string(writer, 'comment', obj.comment)
4962        if obj.console is not None:
4963            ConsoleWriter.write_one(obj.console, writer, 'console')
4964        if obj.cpu is not None:
4965            CpuWriter.write_one(obj.cpu, writer, 'cpu')
4966        if obj.cpu_pinning_policy is not None:
4967            Writer.write_string(writer, 'cpu_pinning_policy', obj.cpu_pinning_policy.value)
4968        if obj.cpu_shares is not None:
4969            Writer.write_integer(writer, 'cpu_shares', obj.cpu_shares)
4970        if obj.creation_time is not None:
4971            Writer.write_date(writer, 'creation_time', obj.creation_time)
4972        if obj.custom_compatibility_version is not None:
4973            VersionWriter.write_one(obj.custom_compatibility_version, writer, 'custom_compatibility_version')
4974        if obj.custom_cpu_model is not None:
4975            Writer.write_string(writer, 'custom_cpu_model', obj.custom_cpu_model)
4976        if obj.custom_emulated_machine is not None:
4977            Writer.write_string(writer, 'custom_emulated_machine', obj.custom_emulated_machine)
4978        if obj.custom_properties is not None:
4979            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
4980        if obj.delete_protected is not None:
4981            Writer.write_boolean(writer, 'delete_protected', obj.delete_protected)
4982        if obj.description is not None:
4983            Writer.write_string(writer, 'description', obj.description)
4984        if obj.display is not None:
4985            DisplayWriter.write_one(obj.display, writer, 'display')
4986        if obj.domain is not None:
4987            DomainWriter.write_one(obj.domain, writer, 'domain')
4988        if obj.high_availability is not None:
4989            HighAvailabilityWriter.write_one(obj.high_availability, writer, 'high_availability')
4990        if obj.initialization is not None:
4991            InitializationWriter.write_one(obj.initialization, writer, 'initialization')
4992        if obj.io is not None:
4993            IoWriter.write_one(obj.io, writer, 'io')
4994        if obj.large_icon is not None:
4995            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
4996        if obj.lease is not None:
4997            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
4998        if obj.memory is not None:
4999            Writer.write_integer(writer, 'memory', obj.memory)
5000        if obj.memory_policy is not None:
5001            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
5002        if obj.migration is not None:
5003            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
5004        if obj.migration_downtime is not None:
5005            Writer.write_integer(writer, 'migration_downtime', obj.migration_downtime)
5006        if obj.multi_queues_enabled is not None:
5007            Writer.write_boolean(writer, 'multi_queues_enabled', obj.multi_queues_enabled)
5008        if obj.name is not None:
5009            Writer.write_string(writer, 'name', obj.name)
5010        if obj.origin is not None:
5011            Writer.write_string(writer, 'origin', obj.origin)
5012        if obj.os is not None:
5013            OperatingSystemWriter.write_one(obj.os, writer, 'os')
5014        if obj.placement_policy is not None:
5015            VmPlacementPolicyWriter.write_one(obj.placement_policy, writer, 'placement_policy')
5016        if obj.rng_device is not None:
5017            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
5018        if obj.serial_number is not None:
5019            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
5020        if obj.small_icon is not None:
5021            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
5022        if obj.soundcard_enabled is not None:
5023            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
5024        if obj.sso is not None:
5025            SsoWriter.write_one(obj.sso, writer, 'sso')
5026        if obj.start_paused is not None:
5027            Writer.write_boolean(writer, 'start_paused', obj.start_paused)
5028        if obj.stateless is not None:
5029            Writer.write_boolean(writer, 'stateless', obj.stateless)
5030        if obj.status is not None:
5031            Writer.write_string(writer, 'status', obj.status.value)
5032        if obj.storage_error_resume_behaviour is not None:
5033            Writer.write_string(writer, 'storage_error_resume_behaviour', obj.storage_error_resume_behaviour.value)
5034        if obj.time_zone is not None:
5035            TimeZoneWriter.write_one(obj.time_zone, writer, 'time_zone')
5036        if obj.tpm_enabled is not None:
5037            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
5038        if obj.tunnel_migration is not None:
5039            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
5040        if obj.type is not None:
5041            Writer.write_string(writer, 'type', obj.type.value)
5042        if obj.usb is not None:
5043            UsbWriter.write_one(obj.usb, writer, 'usb')
5044        if obj.version is not None:
5045            TemplateVersionWriter.write_one(obj.version, writer, 'version')
5046        if obj.virtio_scsi is not None:
5047            VirtioScsiWriter.write_one(obj.virtio_scsi, writer, 'virtio_scsi')
5048        if obj.virtio_scsi_multi_queues is not None:
5049            Writer.write_integer(writer, 'virtio_scsi_multi_queues', obj.virtio_scsi_multi_queues)
5050        if obj.virtio_scsi_multi_queues_enabled is not None:
5051            Writer.write_boolean(writer, 'virtio_scsi_multi_queues_enabled', obj.virtio_scsi_multi_queues_enabled)
5052        if obj.vm is not None:
5053            VmWriter.write_one(obj.vm, writer, 'vm')
5054        if obj.cdroms is not None:
5055            CdromWriter.write_many(obj.cdroms, writer, 'cdrom', 'cdroms')
5056        if obj.cluster is not None:
5057            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
5058        if obj.cpu_profile is not None:
5059            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
5060        if obj.disk_attachments is not None:
5061            DiskAttachmentWriter.write_many(obj.disk_attachments, writer, 'disk_attachment', 'disk_attachments')
5062        if obj.graphics_consoles is not None:
5063            GraphicsConsoleWriter.write_many(obj.graphics_consoles, writer, 'graphics_console', 'graphics_consoles')
5064        if obj.mediated_devices is not None:
5065            VmMediatedDeviceWriter.write_many(obj.mediated_devices, writer, 'vm_mediated_device', 'mediated_devices')
5066        if obj.nics is not None:
5067            NicWriter.write_many(obj.nics, writer, 'nic', 'nics')
5068        if obj.permissions is not None:
5069            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
5070        if obj.quota is not None:
5071            QuotaWriter.write_one(obj.quota, writer, 'quota')
5072        if obj.storage_domain is not None:
5073            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
5074        if obj.tags is not None:
5075            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
5076        if obj.watchdogs is not None:
5077            WatchdogWriter.write_many(obj.watchdogs, writer, 'watchdog', 'watchdogs')
5078        writer.write_end()
5079
5080    @staticmethod
5081    def write_many(objs, writer, singular=None, plural=None):
5082        if singular is None:
5083            singular = 'instance_type'
5084        if plural is None:
5085            plural = 'instance_types'
5086        writer.write_start(plural)
5087        if type(objs) == List:
5088            href = objs.href
5089            if href is not None:
5090                writer.write_attribute('href', href)
5091        for obj in objs:
5092            InstanceTypeWriter.write_one(obj, writer, singular)
5093        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

InstanceTypeWriter()
4943    def __init__(self):
4944        super(InstanceTypeWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
4946    @staticmethod
4947    def write_one(obj, writer, singular=None):
4948        if singular is None:
4949            singular = 'instance_type'
4950        writer.write_start(singular)
4951        href = obj.href
4952        if href is not None:
4953            writer.write_attribute('href', href)
4954        if obj.id is not None:
4955            writer.write_attribute('id', obj.id)
4956        if obj.auto_pinning_policy is not None:
4957            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
4958        if obj.bios is not None:
4959            BiosWriter.write_one(obj.bios, writer, 'bios')
4960        if obj.comment is not None:
4961            Writer.write_string(writer, 'comment', obj.comment)
4962        if obj.console is not None:
4963            ConsoleWriter.write_one(obj.console, writer, 'console')
4964        if obj.cpu is not None:
4965            CpuWriter.write_one(obj.cpu, writer, 'cpu')
4966        if obj.cpu_pinning_policy is not None:
4967            Writer.write_string(writer, 'cpu_pinning_policy', obj.cpu_pinning_policy.value)
4968        if obj.cpu_shares is not None:
4969            Writer.write_integer(writer, 'cpu_shares', obj.cpu_shares)
4970        if obj.creation_time is not None:
4971            Writer.write_date(writer, 'creation_time', obj.creation_time)
4972        if obj.custom_compatibility_version is not None:
4973            VersionWriter.write_one(obj.custom_compatibility_version, writer, 'custom_compatibility_version')
4974        if obj.custom_cpu_model is not None:
4975            Writer.write_string(writer, 'custom_cpu_model', obj.custom_cpu_model)
4976        if obj.custom_emulated_machine is not None:
4977            Writer.write_string(writer, 'custom_emulated_machine', obj.custom_emulated_machine)
4978        if obj.custom_properties is not None:
4979            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
4980        if obj.delete_protected is not None:
4981            Writer.write_boolean(writer, 'delete_protected', obj.delete_protected)
4982        if obj.description is not None:
4983            Writer.write_string(writer, 'description', obj.description)
4984        if obj.display is not None:
4985            DisplayWriter.write_one(obj.display, writer, 'display')
4986        if obj.domain is not None:
4987            DomainWriter.write_one(obj.domain, writer, 'domain')
4988        if obj.high_availability is not None:
4989            HighAvailabilityWriter.write_one(obj.high_availability, writer, 'high_availability')
4990        if obj.initialization is not None:
4991            InitializationWriter.write_one(obj.initialization, writer, 'initialization')
4992        if obj.io is not None:
4993            IoWriter.write_one(obj.io, writer, 'io')
4994        if obj.large_icon is not None:
4995            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
4996        if obj.lease is not None:
4997            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
4998        if obj.memory is not None:
4999            Writer.write_integer(writer, 'memory', obj.memory)
5000        if obj.memory_policy is not None:
5001            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
5002        if obj.migration is not None:
5003            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
5004        if obj.migration_downtime is not None:
5005            Writer.write_integer(writer, 'migration_downtime', obj.migration_downtime)
5006        if obj.multi_queues_enabled is not None:
5007            Writer.write_boolean(writer, 'multi_queues_enabled', obj.multi_queues_enabled)
5008        if obj.name is not None:
5009            Writer.write_string(writer, 'name', obj.name)
5010        if obj.origin is not None:
5011            Writer.write_string(writer, 'origin', obj.origin)
5012        if obj.os is not None:
5013            OperatingSystemWriter.write_one(obj.os, writer, 'os')
5014        if obj.placement_policy is not None:
5015            VmPlacementPolicyWriter.write_one(obj.placement_policy, writer, 'placement_policy')
5016        if obj.rng_device is not None:
5017            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
5018        if obj.serial_number is not None:
5019            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
5020        if obj.small_icon is not None:
5021            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
5022        if obj.soundcard_enabled is not None:
5023            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
5024        if obj.sso is not None:
5025            SsoWriter.write_one(obj.sso, writer, 'sso')
5026        if obj.start_paused is not None:
5027            Writer.write_boolean(writer, 'start_paused', obj.start_paused)
5028        if obj.stateless is not None:
5029            Writer.write_boolean(writer, 'stateless', obj.stateless)
5030        if obj.status is not None:
5031            Writer.write_string(writer, 'status', obj.status.value)
5032        if obj.storage_error_resume_behaviour is not None:
5033            Writer.write_string(writer, 'storage_error_resume_behaviour', obj.storage_error_resume_behaviour.value)
5034        if obj.time_zone is not None:
5035            TimeZoneWriter.write_one(obj.time_zone, writer, 'time_zone')
5036        if obj.tpm_enabled is not None:
5037            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
5038        if obj.tunnel_migration is not None:
5039            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
5040        if obj.type is not None:
5041            Writer.write_string(writer, 'type', obj.type.value)
5042        if obj.usb is not None:
5043            UsbWriter.write_one(obj.usb, writer, 'usb')
5044        if obj.version is not None:
5045            TemplateVersionWriter.write_one(obj.version, writer, 'version')
5046        if obj.virtio_scsi is not None:
5047            VirtioScsiWriter.write_one(obj.virtio_scsi, writer, 'virtio_scsi')
5048        if obj.virtio_scsi_multi_queues is not None:
5049            Writer.write_integer(writer, 'virtio_scsi_multi_queues', obj.virtio_scsi_multi_queues)
5050        if obj.virtio_scsi_multi_queues_enabled is not None:
5051            Writer.write_boolean(writer, 'virtio_scsi_multi_queues_enabled', obj.virtio_scsi_multi_queues_enabled)
5052        if obj.vm is not None:
5053            VmWriter.write_one(obj.vm, writer, 'vm')
5054        if obj.cdroms is not None:
5055            CdromWriter.write_many(obj.cdroms, writer, 'cdrom', 'cdroms')
5056        if obj.cluster is not None:
5057            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
5058        if obj.cpu_profile is not None:
5059            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
5060        if obj.disk_attachments is not None:
5061            DiskAttachmentWriter.write_many(obj.disk_attachments, writer, 'disk_attachment', 'disk_attachments')
5062        if obj.graphics_consoles is not None:
5063            GraphicsConsoleWriter.write_many(obj.graphics_consoles, writer, 'graphics_console', 'graphics_consoles')
5064        if obj.mediated_devices is not None:
5065            VmMediatedDeviceWriter.write_many(obj.mediated_devices, writer, 'vm_mediated_device', 'mediated_devices')
5066        if obj.nics is not None:
5067            NicWriter.write_many(obj.nics, writer, 'nic', 'nics')
5068        if obj.permissions is not None:
5069            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
5070        if obj.quota is not None:
5071            QuotaWriter.write_one(obj.quota, writer, 'quota')
5072        if obj.storage_domain is not None:
5073            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
5074        if obj.tags is not None:
5075            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
5076        if obj.watchdogs is not None:
5077            WatchdogWriter.write_many(obj.watchdogs, writer, 'watchdog', 'watchdogs')
5078        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5080    @staticmethod
5081    def write_many(objs, writer, singular=None, plural=None):
5082        if singular is None:
5083            singular = 'instance_type'
5084        if plural is None:
5085            plural = 'instance_types'
5086        writer.write_start(plural)
5087        if type(objs) == List:
5088            href = objs.href
5089            if href is not None:
5090                writer.write_attribute('href', href)
5091        for obj in objs:
5092            InstanceTypeWriter.write_one(obj, writer, singular)
5093        writer.write_end()
class IoWriter(ovirtsdk4.writer.Writer):
5096class IoWriter(Writer):
5097
5098    def __init__(self):
5099        super(IoWriter, self).__init__()
5100
5101    @staticmethod
5102    def write_one(obj, writer, singular=None):
5103        if singular is None:
5104            singular = 'io'
5105        writer.write_start(singular)
5106        href = obj.href
5107        if href is not None:
5108            writer.write_attribute('href', href)
5109        if obj.threads is not None:
5110            Writer.write_integer(writer, 'threads', obj.threads)
5111        writer.write_end()
5112
5113    @staticmethod
5114    def write_many(objs, writer, singular=None, plural=None):
5115        if singular is None:
5116            singular = 'io'
5117        if plural is None:
5118            plural = 'ios'
5119        writer.write_start(plural)
5120        if type(objs) == List:
5121            href = objs.href
5122            if href is not None:
5123                writer.write_attribute('href', href)
5124        for obj in objs:
5125            IoWriter.write_one(obj, writer, singular)
5126        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

IoWriter()
5098    def __init__(self):
5099        super(IoWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5101    @staticmethod
5102    def write_one(obj, writer, singular=None):
5103        if singular is None:
5104            singular = 'io'
5105        writer.write_start(singular)
5106        href = obj.href
5107        if href is not None:
5108            writer.write_attribute('href', href)
5109        if obj.threads is not None:
5110            Writer.write_integer(writer, 'threads', obj.threads)
5111        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5113    @staticmethod
5114    def write_many(objs, writer, singular=None, plural=None):
5115        if singular is None:
5116            singular = 'io'
5117        if plural is None:
5118            plural = 'ios'
5119        writer.write_start(plural)
5120        if type(objs) == List:
5121            href = objs.href
5122            if href is not None:
5123                writer.write_attribute('href', href)
5124        for obj in objs:
5125            IoWriter.write_one(obj, writer, singular)
5126        writer.write_end()
class IpWriter(ovirtsdk4.writer.Writer):
5129class IpWriter(Writer):
5130
5131    def __init__(self):
5132        super(IpWriter, self).__init__()
5133
5134    @staticmethod
5135    def write_one(obj, writer, singular=None):
5136        if singular is None:
5137            singular = 'ip'
5138        writer.write_start(singular)
5139        href = obj.href
5140        if href is not None:
5141            writer.write_attribute('href', href)
5142        if obj.address is not None:
5143            Writer.write_string(writer, 'address', obj.address)
5144        if obj.gateway is not None:
5145            Writer.write_string(writer, 'gateway', obj.gateway)
5146        if obj.netmask is not None:
5147            Writer.write_string(writer, 'netmask', obj.netmask)
5148        if obj.version is not None:
5149            Writer.write_string(writer, 'version', obj.version.value)
5150        writer.write_end()
5151
5152    @staticmethod
5153    def write_many(objs, writer, singular=None, plural=None):
5154        if singular is None:
5155            singular = 'ip'
5156        if plural is None:
5157            plural = 'ips'
5158        writer.write_start(plural)
5159        if type(objs) == List:
5160            href = objs.href
5161            if href is not None:
5162                writer.write_attribute('href', href)
5163        for obj in objs:
5164            IpWriter.write_one(obj, writer, singular)
5165        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

IpWriter()
5131    def __init__(self):
5132        super(IpWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5134    @staticmethod
5135    def write_one(obj, writer, singular=None):
5136        if singular is None:
5137            singular = 'ip'
5138        writer.write_start(singular)
5139        href = obj.href
5140        if href is not None:
5141            writer.write_attribute('href', href)
5142        if obj.address is not None:
5143            Writer.write_string(writer, 'address', obj.address)
5144        if obj.gateway is not None:
5145            Writer.write_string(writer, 'gateway', obj.gateway)
5146        if obj.netmask is not None:
5147            Writer.write_string(writer, 'netmask', obj.netmask)
5148        if obj.version is not None:
5149            Writer.write_string(writer, 'version', obj.version.value)
5150        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5152    @staticmethod
5153    def write_many(objs, writer, singular=None, plural=None):
5154        if singular is None:
5155            singular = 'ip'
5156        if plural is None:
5157            plural = 'ips'
5158        writer.write_start(plural)
5159        if type(objs) == List:
5160            href = objs.href
5161            if href is not None:
5162                writer.write_attribute('href', href)
5163        for obj in objs:
5164            IpWriter.write_one(obj, writer, singular)
5165        writer.write_end()
class IpAddressAssignmentWriter(ovirtsdk4.writer.Writer):
5168class IpAddressAssignmentWriter(Writer):
5169
5170    def __init__(self):
5171        super(IpAddressAssignmentWriter, self).__init__()
5172
5173    @staticmethod
5174    def write_one(obj, writer, singular=None):
5175        if singular is None:
5176            singular = 'ip_address_assignment'
5177        writer.write_start(singular)
5178        href = obj.href
5179        if href is not None:
5180            writer.write_attribute('href', href)
5181        if obj.assignment_method is not None:
5182            Writer.write_string(writer, 'assignment_method', obj.assignment_method.value)
5183        if obj.ip is not None:
5184            IpWriter.write_one(obj.ip, writer, 'ip')
5185        writer.write_end()
5186
5187    @staticmethod
5188    def write_many(objs, writer, singular=None, plural=None):
5189        if singular is None:
5190            singular = 'ip_address_assignment'
5191        if plural is None:
5192            plural = 'ip_address_assignments'
5193        writer.write_start(plural)
5194        if type(objs) == List:
5195            href = objs.href
5196            if href is not None:
5197                writer.write_attribute('href', href)
5198        for obj in objs:
5199            IpAddressAssignmentWriter.write_one(obj, writer, singular)
5200        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

IpAddressAssignmentWriter()
5170    def __init__(self):
5171        super(IpAddressAssignmentWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5173    @staticmethod
5174    def write_one(obj, writer, singular=None):
5175        if singular is None:
5176            singular = 'ip_address_assignment'
5177        writer.write_start(singular)
5178        href = obj.href
5179        if href is not None:
5180            writer.write_attribute('href', href)
5181        if obj.assignment_method is not None:
5182            Writer.write_string(writer, 'assignment_method', obj.assignment_method.value)
5183        if obj.ip is not None:
5184            IpWriter.write_one(obj.ip, writer, 'ip')
5185        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5187    @staticmethod
5188    def write_many(objs, writer, singular=None, plural=None):
5189        if singular is None:
5190            singular = 'ip_address_assignment'
5191        if plural is None:
5192            plural = 'ip_address_assignments'
5193        writer.write_start(plural)
5194        if type(objs) == List:
5195            href = objs.href
5196            if href is not None:
5197                writer.write_attribute('href', href)
5198        for obj in objs:
5199            IpAddressAssignmentWriter.write_one(obj, writer, singular)
5200        writer.write_end()
class IscsiBondWriter(ovirtsdk4.writer.Writer):
5203class IscsiBondWriter(Writer):
5204
5205    def __init__(self):
5206        super(IscsiBondWriter, self).__init__()
5207
5208    @staticmethod
5209    def write_one(obj, writer, singular=None):
5210        if singular is None:
5211            singular = 'iscsi_bond'
5212        writer.write_start(singular)
5213        href = obj.href
5214        if href is not None:
5215            writer.write_attribute('href', href)
5216        if obj.id is not None:
5217            writer.write_attribute('id', obj.id)
5218        if obj.comment is not None:
5219            Writer.write_string(writer, 'comment', obj.comment)
5220        if obj.description is not None:
5221            Writer.write_string(writer, 'description', obj.description)
5222        if obj.name is not None:
5223            Writer.write_string(writer, 'name', obj.name)
5224        if obj.data_center is not None:
5225            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
5226        if obj.networks is not None:
5227            NetworkWriter.write_many(obj.networks, writer, 'network', 'networks')
5228        if obj.storage_connections is not None:
5229            StorageConnectionWriter.write_many(obj.storage_connections, writer, 'storage_connection', 'storage_connections')
5230        writer.write_end()
5231
5232    @staticmethod
5233    def write_many(objs, writer, singular=None, plural=None):
5234        if singular is None:
5235            singular = 'iscsi_bond'
5236        if plural is None:
5237            plural = 'iscsi_bonds'
5238        writer.write_start(plural)
5239        if type(objs) == List:
5240            href = objs.href
5241            if href is not None:
5242                writer.write_attribute('href', href)
5243        for obj in objs:
5244            IscsiBondWriter.write_one(obj, writer, singular)
5245        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

IscsiBondWriter()
5205    def __init__(self):
5206        super(IscsiBondWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5208    @staticmethod
5209    def write_one(obj, writer, singular=None):
5210        if singular is None:
5211            singular = 'iscsi_bond'
5212        writer.write_start(singular)
5213        href = obj.href
5214        if href is not None:
5215            writer.write_attribute('href', href)
5216        if obj.id is not None:
5217            writer.write_attribute('id', obj.id)
5218        if obj.comment is not None:
5219            Writer.write_string(writer, 'comment', obj.comment)
5220        if obj.description is not None:
5221            Writer.write_string(writer, 'description', obj.description)
5222        if obj.name is not None:
5223            Writer.write_string(writer, 'name', obj.name)
5224        if obj.data_center is not None:
5225            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
5226        if obj.networks is not None:
5227            NetworkWriter.write_many(obj.networks, writer, 'network', 'networks')
5228        if obj.storage_connections is not None:
5229            StorageConnectionWriter.write_many(obj.storage_connections, writer, 'storage_connection', 'storage_connections')
5230        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5232    @staticmethod
5233    def write_many(objs, writer, singular=None, plural=None):
5234        if singular is None:
5235            singular = 'iscsi_bond'
5236        if plural is None:
5237            plural = 'iscsi_bonds'
5238        writer.write_start(plural)
5239        if type(objs) == List:
5240            href = objs.href
5241            if href is not None:
5242                writer.write_attribute('href', href)
5243        for obj in objs:
5244            IscsiBondWriter.write_one(obj, writer, singular)
5245        writer.write_end()
class IscsiDetailsWriter(ovirtsdk4.writer.Writer):
5248class IscsiDetailsWriter(Writer):
5249
5250    def __init__(self):
5251        super(IscsiDetailsWriter, self).__init__()
5252
5253    @staticmethod
5254    def write_one(obj, writer, singular=None):
5255        if singular is None:
5256            singular = 'iscsi_details'
5257        writer.write_start(singular)
5258        href = obj.href
5259        if href is not None:
5260            writer.write_attribute('href', href)
5261        if obj.address is not None:
5262            Writer.write_string(writer, 'address', obj.address)
5263        if obj.disk_id is not None:
5264            Writer.write_string(writer, 'disk_id', obj.disk_id)
5265        if obj.initiator is not None:
5266            Writer.write_string(writer, 'initiator', obj.initiator)
5267        if obj.lun_mapping is not None:
5268            Writer.write_integer(writer, 'lun_mapping', obj.lun_mapping)
5269        if obj.password is not None:
5270            Writer.write_string(writer, 'password', obj.password)
5271        if obj.paths is not None:
5272            Writer.write_integer(writer, 'paths', obj.paths)
5273        if obj.port is not None:
5274            Writer.write_integer(writer, 'port', obj.port)
5275        if obj.portal is not None:
5276            Writer.write_string(writer, 'portal', obj.portal)
5277        if obj.product_id is not None:
5278            Writer.write_string(writer, 'product_id', obj.product_id)
5279        if obj.serial is not None:
5280            Writer.write_string(writer, 'serial', obj.serial)
5281        if obj.size is not None:
5282            Writer.write_integer(writer, 'size', obj.size)
5283        if obj.status is not None:
5284            Writer.write_string(writer, 'status', obj.status)
5285        if obj.storage_domain_id is not None:
5286            Writer.write_string(writer, 'storage_domain_id', obj.storage_domain_id)
5287        if obj.target is not None:
5288            Writer.write_string(writer, 'target', obj.target)
5289        if obj.username is not None:
5290            Writer.write_string(writer, 'username', obj.username)
5291        if obj.vendor_id is not None:
5292            Writer.write_string(writer, 'vendor_id', obj.vendor_id)
5293        if obj.volume_group_id is not None:
5294            Writer.write_string(writer, 'volume_group_id', obj.volume_group_id)
5295        writer.write_end()
5296
5297    @staticmethod
5298    def write_many(objs, writer, singular=None, plural=None):
5299        if singular is None:
5300            singular = 'iscsi_details'
5301        if plural is None:
5302            plural = 'iscsi_detailss'
5303        writer.write_start(plural)
5304        if type(objs) == List:
5305            href = objs.href
5306            if href is not None:
5307                writer.write_attribute('href', href)
5308        for obj in objs:
5309            IscsiDetailsWriter.write_one(obj, writer, singular)
5310        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

IscsiDetailsWriter()
5250    def __init__(self):
5251        super(IscsiDetailsWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5253    @staticmethod
5254    def write_one(obj, writer, singular=None):
5255        if singular is None:
5256            singular = 'iscsi_details'
5257        writer.write_start(singular)
5258        href = obj.href
5259        if href is not None:
5260            writer.write_attribute('href', href)
5261        if obj.address is not None:
5262            Writer.write_string(writer, 'address', obj.address)
5263        if obj.disk_id is not None:
5264            Writer.write_string(writer, 'disk_id', obj.disk_id)
5265        if obj.initiator is not None:
5266            Writer.write_string(writer, 'initiator', obj.initiator)
5267        if obj.lun_mapping is not None:
5268            Writer.write_integer(writer, 'lun_mapping', obj.lun_mapping)
5269        if obj.password is not None:
5270            Writer.write_string(writer, 'password', obj.password)
5271        if obj.paths is not None:
5272            Writer.write_integer(writer, 'paths', obj.paths)
5273        if obj.port is not None:
5274            Writer.write_integer(writer, 'port', obj.port)
5275        if obj.portal is not None:
5276            Writer.write_string(writer, 'portal', obj.portal)
5277        if obj.product_id is not None:
5278            Writer.write_string(writer, 'product_id', obj.product_id)
5279        if obj.serial is not None:
5280            Writer.write_string(writer, 'serial', obj.serial)
5281        if obj.size is not None:
5282            Writer.write_integer(writer, 'size', obj.size)
5283        if obj.status is not None:
5284            Writer.write_string(writer, 'status', obj.status)
5285        if obj.storage_domain_id is not None:
5286            Writer.write_string(writer, 'storage_domain_id', obj.storage_domain_id)
5287        if obj.target is not None:
5288            Writer.write_string(writer, 'target', obj.target)
5289        if obj.username is not None:
5290            Writer.write_string(writer, 'username', obj.username)
5291        if obj.vendor_id is not None:
5292            Writer.write_string(writer, 'vendor_id', obj.vendor_id)
5293        if obj.volume_group_id is not None:
5294            Writer.write_string(writer, 'volume_group_id', obj.volume_group_id)
5295        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5297    @staticmethod
5298    def write_many(objs, writer, singular=None, plural=None):
5299        if singular is None:
5300            singular = 'iscsi_details'
5301        if plural is None:
5302            plural = 'iscsi_detailss'
5303        writer.write_start(plural)
5304        if type(objs) == List:
5305            href = objs.href
5306            if href is not None:
5307                writer.write_attribute('href', href)
5308        for obj in objs:
5309            IscsiDetailsWriter.write_one(obj, writer, singular)
5310        writer.write_end()
class JobWriter(ovirtsdk4.writer.Writer):
5313class JobWriter(Writer):
5314
5315    def __init__(self):
5316        super(JobWriter, self).__init__()
5317
5318    @staticmethod
5319    def write_one(obj, writer, singular=None):
5320        if singular is None:
5321            singular = 'job'
5322        writer.write_start(singular)
5323        href = obj.href
5324        if href is not None:
5325            writer.write_attribute('href', href)
5326        if obj.id is not None:
5327            writer.write_attribute('id', obj.id)
5328        if obj.auto_cleared is not None:
5329            Writer.write_boolean(writer, 'auto_cleared', obj.auto_cleared)
5330        if obj.comment is not None:
5331            Writer.write_string(writer, 'comment', obj.comment)
5332        if obj.description is not None:
5333            Writer.write_string(writer, 'description', obj.description)
5334        if obj.end_time is not None:
5335            Writer.write_date(writer, 'end_time', obj.end_time)
5336        if obj.external is not None:
5337            Writer.write_boolean(writer, 'external', obj.external)
5338        if obj.last_updated is not None:
5339            Writer.write_date(writer, 'last_updated', obj.last_updated)
5340        if obj.name is not None:
5341            Writer.write_string(writer, 'name', obj.name)
5342        if obj.start_time is not None:
5343            Writer.write_date(writer, 'start_time', obj.start_time)
5344        if obj.status is not None:
5345            Writer.write_string(writer, 'status', obj.status.value)
5346        if obj.owner is not None:
5347            UserWriter.write_one(obj.owner, writer, 'owner')
5348        if obj.steps is not None:
5349            StepWriter.write_many(obj.steps, writer, 'step', 'steps')
5350        writer.write_end()
5351
5352    @staticmethod
5353    def write_many(objs, writer, singular=None, plural=None):
5354        if singular is None:
5355            singular = 'job'
5356        if plural is None:
5357            plural = 'jobs'
5358        writer.write_start(plural)
5359        if type(objs) == List:
5360            href = objs.href
5361            if href is not None:
5362                writer.write_attribute('href', href)
5363        for obj in objs:
5364            JobWriter.write_one(obj, writer, singular)
5365        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

JobWriter()
5315    def __init__(self):
5316        super(JobWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5318    @staticmethod
5319    def write_one(obj, writer, singular=None):
5320        if singular is None:
5321            singular = 'job'
5322        writer.write_start(singular)
5323        href = obj.href
5324        if href is not None:
5325            writer.write_attribute('href', href)
5326        if obj.id is not None:
5327            writer.write_attribute('id', obj.id)
5328        if obj.auto_cleared is not None:
5329            Writer.write_boolean(writer, 'auto_cleared', obj.auto_cleared)
5330        if obj.comment is not None:
5331            Writer.write_string(writer, 'comment', obj.comment)
5332        if obj.description is not None:
5333            Writer.write_string(writer, 'description', obj.description)
5334        if obj.end_time is not None:
5335            Writer.write_date(writer, 'end_time', obj.end_time)
5336        if obj.external is not None:
5337            Writer.write_boolean(writer, 'external', obj.external)
5338        if obj.last_updated is not None:
5339            Writer.write_date(writer, 'last_updated', obj.last_updated)
5340        if obj.name is not None:
5341            Writer.write_string(writer, 'name', obj.name)
5342        if obj.start_time is not None:
5343            Writer.write_date(writer, 'start_time', obj.start_time)
5344        if obj.status is not None:
5345            Writer.write_string(writer, 'status', obj.status.value)
5346        if obj.owner is not None:
5347            UserWriter.write_one(obj.owner, writer, 'owner')
5348        if obj.steps is not None:
5349            StepWriter.write_many(obj.steps, writer, 'step', 'steps')
5350        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5352    @staticmethod
5353    def write_many(objs, writer, singular=None, plural=None):
5354        if singular is None:
5355            singular = 'job'
5356        if plural is None:
5357            plural = 'jobs'
5358        writer.write_start(plural)
5359        if type(objs) == List:
5360            href = objs.href
5361            if href is not None:
5362                writer.write_attribute('href', href)
5363        for obj in objs:
5364            JobWriter.write_one(obj, writer, singular)
5365        writer.write_end()
class KatelloErratumWriter(ovirtsdk4.writer.Writer):
5368class KatelloErratumWriter(Writer):
5369
5370    def __init__(self):
5371        super(KatelloErratumWriter, self).__init__()
5372
5373    @staticmethod
5374    def write_one(obj, writer, singular=None):
5375        if singular is None:
5376            singular = 'katello_erratum'
5377        writer.write_start(singular)
5378        href = obj.href
5379        if href is not None:
5380            writer.write_attribute('href', href)
5381        if obj.id is not None:
5382            writer.write_attribute('id', obj.id)
5383        if obj.comment is not None:
5384            Writer.write_string(writer, 'comment', obj.comment)
5385        if obj.description is not None:
5386            Writer.write_string(writer, 'description', obj.description)
5387        if obj.issued is not None:
5388            Writer.write_date(writer, 'issued', obj.issued)
5389        if obj.name is not None:
5390            Writer.write_string(writer, 'name', obj.name)
5391        if obj.packages is not None:
5392            PackageWriter.write_many(obj.packages, writer, 'package', 'packages')
5393        if obj.severity is not None:
5394            Writer.write_string(writer, 'severity', obj.severity)
5395        if obj.solution is not None:
5396            Writer.write_string(writer, 'solution', obj.solution)
5397        if obj.summary is not None:
5398            Writer.write_string(writer, 'summary', obj.summary)
5399        if obj.title is not None:
5400            Writer.write_string(writer, 'title', obj.title)
5401        if obj.type is not None:
5402            Writer.write_string(writer, 'type', obj.type)
5403        if obj.host is not None:
5404            HostWriter.write_one(obj.host, writer, 'host')
5405        if obj.vm is not None:
5406            VmWriter.write_one(obj.vm, writer, 'vm')
5407        writer.write_end()
5408
5409    @staticmethod
5410    def write_many(objs, writer, singular=None, plural=None):
5411        if singular is None:
5412            singular = 'katello_erratum'
5413        if plural is None:
5414            plural = 'katello_errata'
5415        writer.write_start(plural)
5416        if type(objs) == List:
5417            href = objs.href
5418            if href is not None:
5419                writer.write_attribute('href', href)
5420        for obj in objs:
5421            KatelloErratumWriter.write_one(obj, writer, singular)
5422        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

KatelloErratumWriter()
5370    def __init__(self):
5371        super(KatelloErratumWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5373    @staticmethod
5374    def write_one(obj, writer, singular=None):
5375        if singular is None:
5376            singular = 'katello_erratum'
5377        writer.write_start(singular)
5378        href = obj.href
5379        if href is not None:
5380            writer.write_attribute('href', href)
5381        if obj.id is not None:
5382            writer.write_attribute('id', obj.id)
5383        if obj.comment is not None:
5384            Writer.write_string(writer, 'comment', obj.comment)
5385        if obj.description is not None:
5386            Writer.write_string(writer, 'description', obj.description)
5387        if obj.issued is not None:
5388            Writer.write_date(writer, 'issued', obj.issued)
5389        if obj.name is not None:
5390            Writer.write_string(writer, 'name', obj.name)
5391        if obj.packages is not None:
5392            PackageWriter.write_many(obj.packages, writer, 'package', 'packages')
5393        if obj.severity is not None:
5394            Writer.write_string(writer, 'severity', obj.severity)
5395        if obj.solution is not None:
5396            Writer.write_string(writer, 'solution', obj.solution)
5397        if obj.summary is not None:
5398            Writer.write_string(writer, 'summary', obj.summary)
5399        if obj.title is not None:
5400            Writer.write_string(writer, 'title', obj.title)
5401        if obj.type is not None:
5402            Writer.write_string(writer, 'type', obj.type)
5403        if obj.host is not None:
5404            HostWriter.write_one(obj.host, writer, 'host')
5405        if obj.vm is not None:
5406            VmWriter.write_one(obj.vm, writer, 'vm')
5407        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5409    @staticmethod
5410    def write_many(objs, writer, singular=None, plural=None):
5411        if singular is None:
5412            singular = 'katello_erratum'
5413        if plural is None:
5414            plural = 'katello_errata'
5415        writer.write_start(plural)
5416        if type(objs) == List:
5417            href = objs.href
5418            if href is not None:
5419                writer.write_attribute('href', href)
5420        for obj in objs:
5421            KatelloErratumWriter.write_one(obj, writer, singular)
5422        writer.write_end()
class KernelWriter(ovirtsdk4.writer.Writer):
5425class KernelWriter(Writer):
5426
5427    def __init__(self):
5428        super(KernelWriter, self).__init__()
5429
5430    @staticmethod
5431    def write_one(obj, writer, singular=None):
5432        if singular is None:
5433            singular = 'kernel'
5434        writer.write_start(singular)
5435        href = obj.href
5436        if href is not None:
5437            writer.write_attribute('href', href)
5438        if obj.version is not None:
5439            VersionWriter.write_one(obj.version, writer, 'version')
5440        writer.write_end()
5441
5442    @staticmethod
5443    def write_many(objs, writer, singular=None, plural=None):
5444        if singular is None:
5445            singular = 'kernel'
5446        if plural is None:
5447            plural = 'kernels'
5448        writer.write_start(plural)
5449        if type(objs) == List:
5450            href = objs.href
5451            if href is not None:
5452                writer.write_attribute('href', href)
5453        for obj in objs:
5454            KernelWriter.write_one(obj, writer, singular)
5455        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

KernelWriter()
5427    def __init__(self):
5428        super(KernelWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5430    @staticmethod
5431    def write_one(obj, writer, singular=None):
5432        if singular is None:
5433            singular = 'kernel'
5434        writer.write_start(singular)
5435        href = obj.href
5436        if href is not None:
5437            writer.write_attribute('href', href)
5438        if obj.version is not None:
5439            VersionWriter.write_one(obj.version, writer, 'version')
5440        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5442    @staticmethod
5443    def write_many(objs, writer, singular=None, plural=None):
5444        if singular is None:
5445            singular = 'kernel'
5446        if plural is None:
5447            plural = 'kernels'
5448        writer.write_start(plural)
5449        if type(objs) == List:
5450            href = objs.href
5451            if href is not None:
5452                writer.write_attribute('href', href)
5453        for obj in objs:
5454            KernelWriter.write_one(obj, writer, singular)
5455        writer.write_end()
class KsmWriter(ovirtsdk4.writer.Writer):
5458class KsmWriter(Writer):
5459
5460    def __init__(self):
5461        super(KsmWriter, self).__init__()
5462
5463    @staticmethod
5464    def write_one(obj, writer, singular=None):
5465        if singular is None:
5466            singular = 'ksm'
5467        writer.write_start(singular)
5468        href = obj.href
5469        if href is not None:
5470            writer.write_attribute('href', href)
5471        if obj.enabled is not None:
5472            Writer.write_boolean(writer, 'enabled', obj.enabled)
5473        if obj.merge_across_nodes is not None:
5474            Writer.write_boolean(writer, 'merge_across_nodes', obj.merge_across_nodes)
5475        writer.write_end()
5476
5477    @staticmethod
5478    def write_many(objs, writer, singular=None, plural=None):
5479        if singular is None:
5480            singular = 'ksm'
5481        if plural is None:
5482            plural = 'ksms'
5483        writer.write_start(plural)
5484        if type(objs) == List:
5485            href = objs.href
5486            if href is not None:
5487                writer.write_attribute('href', href)
5488        for obj in objs:
5489            KsmWriter.write_one(obj, writer, singular)
5490        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

KsmWriter()
5460    def __init__(self):
5461        super(KsmWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5463    @staticmethod
5464    def write_one(obj, writer, singular=None):
5465        if singular is None:
5466            singular = 'ksm'
5467        writer.write_start(singular)
5468        href = obj.href
5469        if href is not None:
5470            writer.write_attribute('href', href)
5471        if obj.enabled is not None:
5472            Writer.write_boolean(writer, 'enabled', obj.enabled)
5473        if obj.merge_across_nodes is not None:
5474            Writer.write_boolean(writer, 'merge_across_nodes', obj.merge_across_nodes)
5475        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5477    @staticmethod
5478    def write_many(objs, writer, singular=None, plural=None):
5479        if singular is None:
5480            singular = 'ksm'
5481        if plural is None:
5482            plural = 'ksms'
5483        writer.write_start(plural)
5484        if type(objs) == List:
5485            href = objs.href
5486            if href is not None:
5487                writer.write_attribute('href', href)
5488        for obj in objs:
5489            KsmWriter.write_one(obj, writer, singular)
5490        writer.write_end()
class LinkLayerDiscoveryProtocolElementWriter(ovirtsdk4.writer.Writer):
5493class LinkLayerDiscoveryProtocolElementWriter(Writer):
5494
5495    def __init__(self):
5496        super(LinkLayerDiscoveryProtocolElementWriter, self).__init__()
5497
5498    @staticmethod
5499    def write_one(obj, writer, singular=None):
5500        if singular is None:
5501            singular = 'link_layer_discovery_protocol_element'
5502        writer.write_start(singular)
5503        href = obj.href
5504        if href is not None:
5505            writer.write_attribute('href', href)
5506        if obj.id is not None:
5507            writer.write_attribute('id', obj.id)
5508        if obj.comment is not None:
5509            Writer.write_string(writer, 'comment', obj.comment)
5510        if obj.description is not None:
5511            Writer.write_string(writer, 'description', obj.description)
5512        if obj.name is not None:
5513            Writer.write_string(writer, 'name', obj.name)
5514        if obj.oui is not None:
5515            Writer.write_integer(writer, 'oui', obj.oui)
5516        if obj.properties is not None:
5517            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
5518        if obj.subtype is not None:
5519            Writer.write_integer(writer, 'subtype', obj.subtype)
5520        if obj.type is not None:
5521            Writer.write_integer(writer, 'type', obj.type)
5522        writer.write_end()
5523
5524    @staticmethod
5525    def write_many(objs, writer, singular=None, plural=None):
5526        if singular is None:
5527            singular = 'link_layer_discovery_protocol_element'
5528        if plural is None:
5529            plural = 'link_layer_discovery_protocol_elements'
5530        writer.write_start(plural)
5531        if type(objs) == List:
5532            href = objs.href
5533            if href is not None:
5534                writer.write_attribute('href', href)
5535        for obj in objs:
5536            LinkLayerDiscoveryProtocolElementWriter.write_one(obj, writer, singular)
5537        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

LinkLayerDiscoveryProtocolElementWriter()
5495    def __init__(self):
5496        super(LinkLayerDiscoveryProtocolElementWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5498    @staticmethod
5499    def write_one(obj, writer, singular=None):
5500        if singular is None:
5501            singular = 'link_layer_discovery_protocol_element'
5502        writer.write_start(singular)
5503        href = obj.href
5504        if href is not None:
5505            writer.write_attribute('href', href)
5506        if obj.id is not None:
5507            writer.write_attribute('id', obj.id)
5508        if obj.comment is not None:
5509            Writer.write_string(writer, 'comment', obj.comment)
5510        if obj.description is not None:
5511            Writer.write_string(writer, 'description', obj.description)
5512        if obj.name is not None:
5513            Writer.write_string(writer, 'name', obj.name)
5514        if obj.oui is not None:
5515            Writer.write_integer(writer, 'oui', obj.oui)
5516        if obj.properties is not None:
5517            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
5518        if obj.subtype is not None:
5519            Writer.write_integer(writer, 'subtype', obj.subtype)
5520        if obj.type is not None:
5521            Writer.write_integer(writer, 'type', obj.type)
5522        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5524    @staticmethod
5525    def write_many(objs, writer, singular=None, plural=None):
5526        if singular is None:
5527            singular = 'link_layer_discovery_protocol_element'
5528        if plural is None:
5529            plural = 'link_layer_discovery_protocol_elements'
5530        writer.write_start(plural)
5531        if type(objs) == List:
5532            href = objs.href
5533            if href is not None:
5534                writer.write_attribute('href', href)
5535        for obj in objs:
5536            LinkLayerDiscoveryProtocolElementWriter.write_one(obj, writer, singular)
5537        writer.write_end()
class LogicalUnitWriter(ovirtsdk4.writer.Writer):
5540class LogicalUnitWriter(Writer):
5541
5542    def __init__(self):
5543        super(LogicalUnitWriter, self).__init__()
5544
5545    @staticmethod
5546    def write_one(obj, writer, singular=None):
5547        if singular is None:
5548            singular = 'logical_unit'
5549        writer.write_start(singular)
5550        href = obj.href
5551        if href is not None:
5552            writer.write_attribute('href', href)
5553        if obj.id is not None:
5554            writer.write_attribute('id', obj.id)
5555        if obj.address is not None:
5556            Writer.write_string(writer, 'address', obj.address)
5557        if obj.discard_max_size is not None:
5558            Writer.write_integer(writer, 'discard_max_size', obj.discard_max_size)
5559        if obj.discard_zeroes_data is not None:
5560            Writer.write_boolean(writer, 'discard_zeroes_data', obj.discard_zeroes_data)
5561        if obj.disk_id is not None:
5562            Writer.write_string(writer, 'disk_id', obj.disk_id)
5563        if obj.lun_mapping is not None:
5564            Writer.write_integer(writer, 'lun_mapping', obj.lun_mapping)
5565        if obj.password is not None:
5566            Writer.write_string(writer, 'password', obj.password)
5567        if obj.paths is not None:
5568            Writer.write_integer(writer, 'paths', obj.paths)
5569        if obj.port is not None:
5570            Writer.write_integer(writer, 'port', obj.port)
5571        if obj.portal is not None:
5572            Writer.write_string(writer, 'portal', obj.portal)
5573        if obj.product_id is not None:
5574            Writer.write_string(writer, 'product_id', obj.product_id)
5575        if obj.serial is not None:
5576            Writer.write_string(writer, 'serial', obj.serial)
5577        if obj.size is not None:
5578            Writer.write_integer(writer, 'size', obj.size)
5579        if obj.status is not None:
5580            Writer.write_string(writer, 'status', obj.status.value)
5581        if obj.storage_domain_id is not None:
5582            Writer.write_string(writer, 'storage_domain_id', obj.storage_domain_id)
5583        if obj.target is not None:
5584            Writer.write_string(writer, 'target', obj.target)
5585        if obj.username is not None:
5586            Writer.write_string(writer, 'username', obj.username)
5587        if obj.vendor_id is not None:
5588            Writer.write_string(writer, 'vendor_id', obj.vendor_id)
5589        if obj.volume_group_id is not None:
5590            Writer.write_string(writer, 'volume_group_id', obj.volume_group_id)
5591        writer.write_end()
5592
5593    @staticmethod
5594    def write_many(objs, writer, singular=None, plural=None):
5595        if singular is None:
5596            singular = 'logical_unit'
5597        if plural is None:
5598            plural = 'logical_units'
5599        writer.write_start(plural)
5600        if type(objs) == List:
5601            href = objs.href
5602            if href is not None:
5603                writer.write_attribute('href', href)
5604        for obj in objs:
5605            LogicalUnitWriter.write_one(obj, writer, singular)
5606        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

LogicalUnitWriter()
5542    def __init__(self):
5543        super(LogicalUnitWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5545    @staticmethod
5546    def write_one(obj, writer, singular=None):
5547        if singular is None:
5548            singular = 'logical_unit'
5549        writer.write_start(singular)
5550        href = obj.href
5551        if href is not None:
5552            writer.write_attribute('href', href)
5553        if obj.id is not None:
5554            writer.write_attribute('id', obj.id)
5555        if obj.address is not None:
5556            Writer.write_string(writer, 'address', obj.address)
5557        if obj.discard_max_size is not None:
5558            Writer.write_integer(writer, 'discard_max_size', obj.discard_max_size)
5559        if obj.discard_zeroes_data is not None:
5560            Writer.write_boolean(writer, 'discard_zeroes_data', obj.discard_zeroes_data)
5561        if obj.disk_id is not None:
5562            Writer.write_string(writer, 'disk_id', obj.disk_id)
5563        if obj.lun_mapping is not None:
5564            Writer.write_integer(writer, 'lun_mapping', obj.lun_mapping)
5565        if obj.password is not None:
5566            Writer.write_string(writer, 'password', obj.password)
5567        if obj.paths is not None:
5568            Writer.write_integer(writer, 'paths', obj.paths)
5569        if obj.port is not None:
5570            Writer.write_integer(writer, 'port', obj.port)
5571        if obj.portal is not None:
5572            Writer.write_string(writer, 'portal', obj.portal)
5573        if obj.product_id is not None:
5574            Writer.write_string(writer, 'product_id', obj.product_id)
5575        if obj.serial is not None:
5576            Writer.write_string(writer, 'serial', obj.serial)
5577        if obj.size is not None:
5578            Writer.write_integer(writer, 'size', obj.size)
5579        if obj.status is not None:
5580            Writer.write_string(writer, 'status', obj.status.value)
5581        if obj.storage_domain_id is not None:
5582            Writer.write_string(writer, 'storage_domain_id', obj.storage_domain_id)
5583        if obj.target is not None:
5584            Writer.write_string(writer, 'target', obj.target)
5585        if obj.username is not None:
5586            Writer.write_string(writer, 'username', obj.username)
5587        if obj.vendor_id is not None:
5588            Writer.write_string(writer, 'vendor_id', obj.vendor_id)
5589        if obj.volume_group_id is not None:
5590            Writer.write_string(writer, 'volume_group_id', obj.volume_group_id)
5591        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5593    @staticmethod
5594    def write_many(objs, writer, singular=None, plural=None):
5595        if singular is None:
5596            singular = 'logical_unit'
5597        if plural is None:
5598            plural = 'logical_units'
5599        writer.write_start(plural)
5600        if type(objs) == List:
5601            href = objs.href
5602            if href is not None:
5603                writer.write_attribute('href', href)
5604        for obj in objs:
5605            LogicalUnitWriter.write_one(obj, writer, singular)
5606        writer.write_end()
class MDevTypeWriter(ovirtsdk4.writer.Writer):
5609class MDevTypeWriter(Writer):
5610
5611    def __init__(self):
5612        super(MDevTypeWriter, self).__init__()
5613
5614    @staticmethod
5615    def write_one(obj, writer, singular=None):
5616        if singular is None:
5617            singular = 'm_dev_type'
5618        writer.write_start(singular)
5619        href = obj.href
5620        if href is not None:
5621            writer.write_attribute('href', href)
5622        if obj.available_instances is not None:
5623            Writer.write_integer(writer, 'available_instances', obj.available_instances)
5624        if obj.description is not None:
5625            Writer.write_string(writer, 'description', obj.description)
5626        if obj.human_readable_name is not None:
5627            Writer.write_string(writer, 'human_readable_name', obj.human_readable_name)
5628        if obj.name is not None:
5629            Writer.write_string(writer, 'name', obj.name)
5630        writer.write_end()
5631
5632    @staticmethod
5633    def write_many(objs, writer, singular=None, plural=None):
5634        if singular is None:
5635            singular = 'm_dev_type'
5636        if plural is None:
5637            plural = 'm_dev_types'
5638        writer.write_start(plural)
5639        if type(objs) == List:
5640            href = objs.href
5641            if href is not None:
5642                writer.write_attribute('href', href)
5643        for obj in objs:
5644            MDevTypeWriter.write_one(obj, writer, singular)
5645        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

MDevTypeWriter()
5611    def __init__(self):
5612        super(MDevTypeWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5614    @staticmethod
5615    def write_one(obj, writer, singular=None):
5616        if singular is None:
5617            singular = 'm_dev_type'
5618        writer.write_start(singular)
5619        href = obj.href
5620        if href is not None:
5621            writer.write_attribute('href', href)
5622        if obj.available_instances is not None:
5623            Writer.write_integer(writer, 'available_instances', obj.available_instances)
5624        if obj.description is not None:
5625            Writer.write_string(writer, 'description', obj.description)
5626        if obj.human_readable_name is not None:
5627            Writer.write_string(writer, 'human_readable_name', obj.human_readable_name)
5628        if obj.name is not None:
5629            Writer.write_string(writer, 'name', obj.name)
5630        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5632    @staticmethod
5633    def write_many(objs, writer, singular=None, plural=None):
5634        if singular is None:
5635            singular = 'm_dev_type'
5636        if plural is None:
5637            plural = 'm_dev_types'
5638        writer.write_start(plural)
5639        if type(objs) == List:
5640            href = objs.href
5641            if href is not None:
5642                writer.write_attribute('href', href)
5643        for obj in objs:
5644            MDevTypeWriter.write_one(obj, writer, singular)
5645        writer.write_end()
class MacWriter(ovirtsdk4.writer.Writer):
5648class MacWriter(Writer):
5649
5650    def __init__(self):
5651        super(MacWriter, self).__init__()
5652
5653    @staticmethod
5654    def write_one(obj, writer, singular=None):
5655        if singular is None:
5656            singular = 'mac'
5657        writer.write_start(singular)
5658        href = obj.href
5659        if href is not None:
5660            writer.write_attribute('href', href)
5661        if obj.address is not None:
5662            Writer.write_string(writer, 'address', obj.address)
5663        writer.write_end()
5664
5665    @staticmethod
5666    def write_many(objs, writer, singular=None, plural=None):
5667        if singular is None:
5668            singular = 'mac'
5669        if plural is None:
5670            plural = 'macs'
5671        writer.write_start(plural)
5672        if type(objs) == List:
5673            href = objs.href
5674            if href is not None:
5675                writer.write_attribute('href', href)
5676        for obj in objs:
5677            MacWriter.write_one(obj, writer, singular)
5678        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

MacWriter()
5650    def __init__(self):
5651        super(MacWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5653    @staticmethod
5654    def write_one(obj, writer, singular=None):
5655        if singular is None:
5656            singular = 'mac'
5657        writer.write_start(singular)
5658        href = obj.href
5659        if href is not None:
5660            writer.write_attribute('href', href)
5661        if obj.address is not None:
5662            Writer.write_string(writer, 'address', obj.address)
5663        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5665    @staticmethod
5666    def write_many(objs, writer, singular=None, plural=None):
5667        if singular is None:
5668            singular = 'mac'
5669        if plural is None:
5670            plural = 'macs'
5671        writer.write_start(plural)
5672        if type(objs) == List:
5673            href = objs.href
5674            if href is not None:
5675                writer.write_attribute('href', href)
5676        for obj in objs:
5677            MacWriter.write_one(obj, writer, singular)
5678        writer.write_end()
class MacPoolWriter(ovirtsdk4.writer.Writer):
5681class MacPoolWriter(Writer):
5682
5683    def __init__(self):
5684        super(MacPoolWriter, self).__init__()
5685
5686    @staticmethod
5687    def write_one(obj, writer, singular=None):
5688        if singular is None:
5689            singular = 'mac_pool'
5690        writer.write_start(singular)
5691        href = obj.href
5692        if href is not None:
5693            writer.write_attribute('href', href)
5694        if obj.id is not None:
5695            writer.write_attribute('id', obj.id)
5696        if obj.allow_duplicates is not None:
5697            Writer.write_boolean(writer, 'allow_duplicates', obj.allow_duplicates)
5698        if obj.comment is not None:
5699            Writer.write_string(writer, 'comment', obj.comment)
5700        if obj.default_pool is not None:
5701            Writer.write_boolean(writer, 'default_pool', obj.default_pool)
5702        if obj.description is not None:
5703            Writer.write_string(writer, 'description', obj.description)
5704        if obj.name is not None:
5705            Writer.write_string(writer, 'name', obj.name)
5706        if obj.ranges is not None:
5707            RangeWriter.write_many(obj.ranges, writer, 'range', 'ranges')
5708        if obj.permissions is not None:
5709            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
5710        writer.write_end()
5711
5712    @staticmethod
5713    def write_many(objs, writer, singular=None, plural=None):
5714        if singular is None:
5715            singular = 'mac_pool'
5716        if plural is None:
5717            plural = 'mac_pools'
5718        writer.write_start(plural)
5719        if type(objs) == List:
5720            href = objs.href
5721            if href is not None:
5722                writer.write_attribute('href', href)
5723        for obj in objs:
5724            MacPoolWriter.write_one(obj, writer, singular)
5725        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

MacPoolWriter()
5683    def __init__(self):
5684        super(MacPoolWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5686    @staticmethod
5687    def write_one(obj, writer, singular=None):
5688        if singular is None:
5689            singular = 'mac_pool'
5690        writer.write_start(singular)
5691        href = obj.href
5692        if href is not None:
5693            writer.write_attribute('href', href)
5694        if obj.id is not None:
5695            writer.write_attribute('id', obj.id)
5696        if obj.allow_duplicates is not None:
5697            Writer.write_boolean(writer, 'allow_duplicates', obj.allow_duplicates)
5698        if obj.comment is not None:
5699            Writer.write_string(writer, 'comment', obj.comment)
5700        if obj.default_pool is not None:
5701            Writer.write_boolean(writer, 'default_pool', obj.default_pool)
5702        if obj.description is not None:
5703            Writer.write_string(writer, 'description', obj.description)
5704        if obj.name is not None:
5705            Writer.write_string(writer, 'name', obj.name)
5706        if obj.ranges is not None:
5707            RangeWriter.write_many(obj.ranges, writer, 'range', 'ranges')
5708        if obj.permissions is not None:
5709            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
5710        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5712    @staticmethod
5713    def write_many(objs, writer, singular=None, plural=None):
5714        if singular is None:
5715            singular = 'mac_pool'
5716        if plural is None:
5717            plural = 'mac_pools'
5718        writer.write_start(plural)
5719        if type(objs) == List:
5720            href = objs.href
5721            if href is not None:
5722                writer.write_attribute('href', href)
5723        for obj in objs:
5724            MacPoolWriter.write_one(obj, writer, singular)
5725        writer.write_end()
class MemoryOverCommitWriter(ovirtsdk4.writer.Writer):
5728class MemoryOverCommitWriter(Writer):
5729
5730    def __init__(self):
5731        super(MemoryOverCommitWriter, self).__init__()
5732
5733    @staticmethod
5734    def write_one(obj, writer, singular=None):
5735        if singular is None:
5736            singular = 'memory_over_commit'
5737        writer.write_start(singular)
5738        href = obj.href
5739        if href is not None:
5740            writer.write_attribute('href', href)
5741        if obj.percent is not None:
5742            Writer.write_integer(writer, 'percent', obj.percent)
5743        writer.write_end()
5744
5745    @staticmethod
5746    def write_many(objs, writer, singular=None, plural=None):
5747        if singular is None:
5748            singular = 'memory_over_commit'
5749        if plural is None:
5750            plural = 'memory_over_commits'
5751        writer.write_start(plural)
5752        if type(objs) == List:
5753            href = objs.href
5754            if href is not None:
5755                writer.write_attribute('href', href)
5756        for obj in objs:
5757            MemoryOverCommitWriter.write_one(obj, writer, singular)
5758        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

MemoryOverCommitWriter()
5730    def __init__(self):
5731        super(MemoryOverCommitWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5733    @staticmethod
5734    def write_one(obj, writer, singular=None):
5735        if singular is None:
5736            singular = 'memory_over_commit'
5737        writer.write_start(singular)
5738        href = obj.href
5739        if href is not None:
5740            writer.write_attribute('href', href)
5741        if obj.percent is not None:
5742            Writer.write_integer(writer, 'percent', obj.percent)
5743        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5745    @staticmethod
5746    def write_many(objs, writer, singular=None, plural=None):
5747        if singular is None:
5748            singular = 'memory_over_commit'
5749        if plural is None:
5750            plural = 'memory_over_commits'
5751        writer.write_start(plural)
5752        if type(objs) == List:
5753            href = objs.href
5754            if href is not None:
5755                writer.write_attribute('href', href)
5756        for obj in objs:
5757            MemoryOverCommitWriter.write_one(obj, writer, singular)
5758        writer.write_end()
class MemoryPolicyWriter(ovirtsdk4.writer.Writer):
5761class MemoryPolicyWriter(Writer):
5762
5763    def __init__(self):
5764        super(MemoryPolicyWriter, self).__init__()
5765
5766    @staticmethod
5767    def write_one(obj, writer, singular=None):
5768        if singular is None:
5769            singular = 'memory_policy'
5770        writer.write_start(singular)
5771        href = obj.href
5772        if href is not None:
5773            writer.write_attribute('href', href)
5774        if obj.ballooning is not None:
5775            Writer.write_boolean(writer, 'ballooning', obj.ballooning)
5776        if obj.guaranteed is not None:
5777            Writer.write_integer(writer, 'guaranteed', obj.guaranteed)
5778        if obj.max is not None:
5779            Writer.write_integer(writer, 'max', obj.max)
5780        if obj.over_commit is not None:
5781            MemoryOverCommitWriter.write_one(obj.over_commit, writer, 'over_commit')
5782        if obj.transparent_huge_pages is not None:
5783            TransparentHugePagesWriter.write_one(obj.transparent_huge_pages, writer, 'transparent_hugepages')
5784        writer.write_end()
5785
5786    @staticmethod
5787    def write_many(objs, writer, singular=None, plural=None):
5788        if singular is None:
5789            singular = 'memory_policy'
5790        if plural is None:
5791            plural = 'memory_policies'
5792        writer.write_start(plural)
5793        if type(objs) == List:
5794            href = objs.href
5795            if href is not None:
5796                writer.write_attribute('href', href)
5797        for obj in objs:
5798            MemoryPolicyWriter.write_one(obj, writer, singular)
5799        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

MemoryPolicyWriter()
5763    def __init__(self):
5764        super(MemoryPolicyWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5766    @staticmethod
5767    def write_one(obj, writer, singular=None):
5768        if singular is None:
5769            singular = 'memory_policy'
5770        writer.write_start(singular)
5771        href = obj.href
5772        if href is not None:
5773            writer.write_attribute('href', href)
5774        if obj.ballooning is not None:
5775            Writer.write_boolean(writer, 'ballooning', obj.ballooning)
5776        if obj.guaranteed is not None:
5777            Writer.write_integer(writer, 'guaranteed', obj.guaranteed)
5778        if obj.max is not None:
5779            Writer.write_integer(writer, 'max', obj.max)
5780        if obj.over_commit is not None:
5781            MemoryOverCommitWriter.write_one(obj.over_commit, writer, 'over_commit')
5782        if obj.transparent_huge_pages is not None:
5783            TransparentHugePagesWriter.write_one(obj.transparent_huge_pages, writer, 'transparent_hugepages')
5784        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5786    @staticmethod
5787    def write_many(objs, writer, singular=None, plural=None):
5788        if singular is None:
5789            singular = 'memory_policy'
5790        if plural is None:
5791            plural = 'memory_policies'
5792        writer.write_start(plural)
5793        if type(objs) == List:
5794            href = objs.href
5795            if href is not None:
5796                writer.write_attribute('href', href)
5797        for obj in objs:
5798            MemoryPolicyWriter.write_one(obj, writer, singular)
5799        writer.write_end()
class MethodWriter(ovirtsdk4.writer.Writer):
5802class MethodWriter(Writer):
5803
5804    def __init__(self):
5805        super(MethodWriter, self).__init__()
5806
5807    @staticmethod
5808    def write_one(obj, writer, singular=None):
5809        if singular is None:
5810            singular = 'method'
5811        writer.write_start(singular)
5812        href = obj.href
5813        if href is not None:
5814            writer.write_attribute('href', href)
5815        if obj.id is not None:
5816            writer.write_attribute('id', obj.id.value)
5817        writer.write_end()
5818
5819    @staticmethod
5820    def write_many(objs, writer, singular=None, plural=None):
5821        if singular is None:
5822            singular = 'method'
5823        if plural is None:
5824            plural = 'methods'
5825        writer.write_start(plural)
5826        if type(objs) == List:
5827            href = objs.href
5828            if href is not None:
5829                writer.write_attribute('href', href)
5830        for obj in objs:
5831            MethodWriter.write_one(obj, writer, singular)
5832        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

MethodWriter()
5804    def __init__(self):
5805        super(MethodWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5807    @staticmethod
5808    def write_one(obj, writer, singular=None):
5809        if singular is None:
5810            singular = 'method'
5811        writer.write_start(singular)
5812        href = obj.href
5813        if href is not None:
5814            writer.write_attribute('href', href)
5815        if obj.id is not None:
5816            writer.write_attribute('id', obj.id.value)
5817        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5819    @staticmethod
5820    def write_many(objs, writer, singular=None, plural=None):
5821        if singular is None:
5822            singular = 'method'
5823        if plural is None:
5824            plural = 'methods'
5825        writer.write_start(plural)
5826        if type(objs) == List:
5827            href = objs.href
5828            if href is not None:
5829                writer.write_attribute('href', href)
5830        for obj in objs:
5831            MethodWriter.write_one(obj, writer, singular)
5832        writer.write_end()
class MigrationBandwidthWriter(ovirtsdk4.writer.Writer):
5835class MigrationBandwidthWriter(Writer):
5836
5837    def __init__(self):
5838        super(MigrationBandwidthWriter, self).__init__()
5839
5840    @staticmethod
5841    def write_one(obj, writer, singular=None):
5842        if singular is None:
5843            singular = 'migration_bandwidth'
5844        writer.write_start(singular)
5845        href = obj.href
5846        if href is not None:
5847            writer.write_attribute('href', href)
5848        if obj.assignment_method is not None:
5849            Writer.write_string(writer, 'assignment_method', obj.assignment_method.value)
5850        if obj.custom_value is not None:
5851            Writer.write_integer(writer, 'custom_value', obj.custom_value)
5852        writer.write_end()
5853
5854    @staticmethod
5855    def write_many(objs, writer, singular=None, plural=None):
5856        if singular is None:
5857            singular = 'migration_bandwidth'
5858        if plural is None:
5859            plural = 'migration_bandwidths'
5860        writer.write_start(plural)
5861        if type(objs) == List:
5862            href = objs.href
5863            if href is not None:
5864                writer.write_attribute('href', href)
5865        for obj in objs:
5866            MigrationBandwidthWriter.write_one(obj, writer, singular)
5867        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

MigrationBandwidthWriter()
5837    def __init__(self):
5838        super(MigrationBandwidthWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5840    @staticmethod
5841    def write_one(obj, writer, singular=None):
5842        if singular is None:
5843            singular = 'migration_bandwidth'
5844        writer.write_start(singular)
5845        href = obj.href
5846        if href is not None:
5847            writer.write_attribute('href', href)
5848        if obj.assignment_method is not None:
5849            Writer.write_string(writer, 'assignment_method', obj.assignment_method.value)
5850        if obj.custom_value is not None:
5851            Writer.write_integer(writer, 'custom_value', obj.custom_value)
5852        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5854    @staticmethod
5855    def write_many(objs, writer, singular=None, plural=None):
5856        if singular is None:
5857            singular = 'migration_bandwidth'
5858        if plural is None:
5859            plural = 'migration_bandwidths'
5860        writer.write_start(plural)
5861        if type(objs) == List:
5862            href = objs.href
5863            if href is not None:
5864                writer.write_attribute('href', href)
5865        for obj in objs:
5866            MigrationBandwidthWriter.write_one(obj, writer, singular)
5867        writer.write_end()
class MigrationOptionsWriter(ovirtsdk4.writer.Writer):
5870class MigrationOptionsWriter(Writer):
5871
5872    def __init__(self):
5873        super(MigrationOptionsWriter, self).__init__()
5874
5875    @staticmethod
5876    def write_one(obj, writer, singular=None):
5877        if singular is None:
5878            singular = 'migration'
5879        writer.write_start(singular)
5880        href = obj.href
5881        if href is not None:
5882            writer.write_attribute('href', href)
5883        if obj.auto_converge is not None:
5884            Writer.write_string(writer, 'auto_converge', obj.auto_converge.value)
5885        if obj.bandwidth is not None:
5886            MigrationBandwidthWriter.write_one(obj.bandwidth, writer, 'bandwidth')
5887        if obj.compressed is not None:
5888            Writer.write_string(writer, 'compressed', obj.compressed.value)
5889        if obj.custom_parallel_migrations is not None:
5890            Writer.write_integer(writer, 'custom_parallel_migrations', obj.custom_parallel_migrations)
5891        if obj.encrypted is not None:
5892            Writer.write_string(writer, 'encrypted', obj.encrypted.value)
5893        if obj.parallel_migrations_policy is not None:
5894            Writer.write_string(writer, 'parallel_migrations_policy', obj.parallel_migrations_policy.value)
5895        if obj.policy is not None:
5896            MigrationPolicyWriter.write_one(obj.policy, writer, 'policy')
5897        writer.write_end()
5898
5899    @staticmethod
5900    def write_many(objs, writer, singular=None, plural=None):
5901        if singular is None:
5902            singular = 'migration'
5903        if plural is None:
5904            plural = 'migration_optionss'
5905        writer.write_start(plural)
5906        if type(objs) == List:
5907            href = objs.href
5908            if href is not None:
5909                writer.write_attribute('href', href)
5910        for obj in objs:
5911            MigrationOptionsWriter.write_one(obj, writer, singular)
5912        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

MigrationOptionsWriter()
5872    def __init__(self):
5873        super(MigrationOptionsWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5875    @staticmethod
5876    def write_one(obj, writer, singular=None):
5877        if singular is None:
5878            singular = 'migration'
5879        writer.write_start(singular)
5880        href = obj.href
5881        if href is not None:
5882            writer.write_attribute('href', href)
5883        if obj.auto_converge is not None:
5884            Writer.write_string(writer, 'auto_converge', obj.auto_converge.value)
5885        if obj.bandwidth is not None:
5886            MigrationBandwidthWriter.write_one(obj.bandwidth, writer, 'bandwidth')
5887        if obj.compressed is not None:
5888            Writer.write_string(writer, 'compressed', obj.compressed.value)
5889        if obj.custom_parallel_migrations is not None:
5890            Writer.write_integer(writer, 'custom_parallel_migrations', obj.custom_parallel_migrations)
5891        if obj.encrypted is not None:
5892            Writer.write_string(writer, 'encrypted', obj.encrypted.value)
5893        if obj.parallel_migrations_policy is not None:
5894            Writer.write_string(writer, 'parallel_migrations_policy', obj.parallel_migrations_policy.value)
5895        if obj.policy is not None:
5896            MigrationPolicyWriter.write_one(obj.policy, writer, 'policy')
5897        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5899    @staticmethod
5900    def write_many(objs, writer, singular=None, plural=None):
5901        if singular is None:
5902            singular = 'migration'
5903        if plural is None:
5904            plural = 'migration_optionss'
5905        writer.write_start(plural)
5906        if type(objs) == List:
5907            href = objs.href
5908            if href is not None:
5909                writer.write_attribute('href', href)
5910        for obj in objs:
5911            MigrationOptionsWriter.write_one(obj, writer, singular)
5912        writer.write_end()
class MigrationPolicyWriter(ovirtsdk4.writer.Writer):
5915class MigrationPolicyWriter(Writer):
5916
5917    def __init__(self):
5918        super(MigrationPolicyWriter, self).__init__()
5919
5920    @staticmethod
5921    def write_one(obj, writer, singular=None):
5922        if singular is None:
5923            singular = 'migration_policy'
5924        writer.write_start(singular)
5925        href = obj.href
5926        if href is not None:
5927            writer.write_attribute('href', href)
5928        if obj.id is not None:
5929            writer.write_attribute('id', obj.id)
5930        if obj.comment is not None:
5931            Writer.write_string(writer, 'comment', obj.comment)
5932        if obj.description is not None:
5933            Writer.write_string(writer, 'description', obj.description)
5934        if obj.name is not None:
5935            Writer.write_string(writer, 'name', obj.name)
5936        writer.write_end()
5937
5938    @staticmethod
5939    def write_many(objs, writer, singular=None, plural=None):
5940        if singular is None:
5941            singular = 'migration_policy'
5942        if plural is None:
5943            plural = 'migration_policies'
5944        writer.write_start(plural)
5945        if type(objs) == List:
5946            href = objs.href
5947            if href is not None:
5948                writer.write_attribute('href', href)
5949        for obj in objs:
5950            MigrationPolicyWriter.write_one(obj, writer, singular)
5951        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

MigrationPolicyWriter()
5917    def __init__(self):
5918        super(MigrationPolicyWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5920    @staticmethod
5921    def write_one(obj, writer, singular=None):
5922        if singular is None:
5923            singular = 'migration_policy'
5924        writer.write_start(singular)
5925        href = obj.href
5926        if href is not None:
5927            writer.write_attribute('href', href)
5928        if obj.id is not None:
5929            writer.write_attribute('id', obj.id)
5930        if obj.comment is not None:
5931            Writer.write_string(writer, 'comment', obj.comment)
5932        if obj.description is not None:
5933            Writer.write_string(writer, 'description', obj.description)
5934        if obj.name is not None:
5935            Writer.write_string(writer, 'name', obj.name)
5936        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
5938    @staticmethod
5939    def write_many(objs, writer, singular=None, plural=None):
5940        if singular is None:
5941            singular = 'migration_policy'
5942        if plural is None:
5943            plural = 'migration_policies'
5944        writer.write_start(plural)
5945        if type(objs) == List:
5946            href = objs.href
5947            if href is not None:
5948                writer.write_attribute('href', href)
5949        for obj in objs:
5950            MigrationPolicyWriter.write_one(obj, writer, singular)
5951        writer.write_end()
class NetworkWriter(ovirtsdk4.writer.Writer):
5954class NetworkWriter(Writer):
5955
5956    def __init__(self):
5957        super(NetworkWriter, self).__init__()
5958
5959    @staticmethod
5960    def write_one(obj, writer, singular=None):
5961        if singular is None:
5962            singular = 'network'
5963        writer.write_start(singular)
5964        href = obj.href
5965        if href is not None:
5966            writer.write_attribute('href', href)
5967        if obj.id is not None:
5968            writer.write_attribute('id', obj.id)
5969        if obj.comment is not None:
5970            Writer.write_string(writer, 'comment', obj.comment)
5971        if obj.description is not None:
5972            Writer.write_string(writer, 'description', obj.description)
5973        if obj.display is not None:
5974            Writer.write_boolean(writer, 'display', obj.display)
5975        if obj.dns_resolver_configuration is not None:
5976            DnsResolverConfigurationWriter.write_one(obj.dns_resolver_configuration, writer, 'dns_resolver_configuration')
5977        if obj.ip is not None:
5978            IpWriter.write_one(obj.ip, writer, 'ip')
5979        if obj.mtu is not None:
5980            Writer.write_integer(writer, 'mtu', obj.mtu)
5981        if obj.name is not None:
5982            Writer.write_string(writer, 'name', obj.name)
5983        if obj.port_isolation is not None:
5984            Writer.write_boolean(writer, 'port_isolation', obj.port_isolation)
5985        if obj.profile_required is not None:
5986            Writer.write_boolean(writer, 'profile_required', obj.profile_required)
5987        if obj.required is not None:
5988            Writer.write_boolean(writer, 'required', obj.required)
5989        if obj.status is not None:
5990            Writer.write_string(writer, 'status', obj.status.value)
5991        if obj.stp is not None:
5992            Writer.write_boolean(writer, 'stp', obj.stp)
5993        if obj.usages is not None:
5994            writer.write_start('usages')
5995            for item in obj.usages:
5996                if item is not None:
5997                    Writer.write_string(writer, 'usage', item.value)
5998            writer.write_end()
5999        if obj.vdsm_name is not None:
6000            Writer.write_string(writer, 'vdsm_name', obj.vdsm_name)
6001        if obj.vlan is not None:
6002            VlanWriter.write_one(obj.vlan, writer, 'vlan')
6003        if obj.cluster is not None:
6004            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
6005        if obj.data_center is not None:
6006            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
6007        if obj.external_provider is not None:
6008            OpenStackNetworkProviderWriter.write_one(obj.external_provider, writer, 'external_provider')
6009        if obj.external_provider_physical_network is not None:
6010            NetworkWriter.write_one(obj.external_provider_physical_network, writer, 'external_provider_physical_network')
6011        if obj.network_labels is not None:
6012            NetworkLabelWriter.write_many(obj.network_labels, writer, 'network_label', 'network_labels')
6013        if obj.permissions is not None:
6014            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
6015        if obj.qos is not None:
6016            QosWriter.write_one(obj.qos, writer, 'qos')
6017        if obj.vnic_profiles is not None:
6018            VnicProfileWriter.write_many(obj.vnic_profiles, writer, 'vnic_profile', 'vnic_profiles')
6019        writer.write_end()
6020
6021    @staticmethod
6022    def write_many(objs, writer, singular=None, plural=None):
6023        if singular is None:
6024            singular = 'network'
6025        if plural is None:
6026            plural = 'networks'
6027        writer.write_start(plural)
6028        if type(objs) == List:
6029            href = objs.href
6030            if href is not None:
6031                writer.write_attribute('href', href)
6032        for obj in objs:
6033            NetworkWriter.write_one(obj, writer, singular)
6034        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

NetworkWriter()
5956    def __init__(self):
5957        super(NetworkWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
5959    @staticmethod
5960    def write_one(obj, writer, singular=None):
5961        if singular is None:
5962            singular = 'network'
5963        writer.write_start(singular)
5964        href = obj.href
5965        if href is not None:
5966            writer.write_attribute('href', href)
5967        if obj.id is not None:
5968            writer.write_attribute('id', obj.id)
5969        if obj.comment is not None:
5970            Writer.write_string(writer, 'comment', obj.comment)
5971        if obj.description is not None:
5972            Writer.write_string(writer, 'description', obj.description)
5973        if obj.display is not None:
5974            Writer.write_boolean(writer, 'display', obj.display)
5975        if obj.dns_resolver_configuration is not None:
5976            DnsResolverConfigurationWriter.write_one(obj.dns_resolver_configuration, writer, 'dns_resolver_configuration')
5977        if obj.ip is not None:
5978            IpWriter.write_one(obj.ip, writer, 'ip')
5979        if obj.mtu is not None:
5980            Writer.write_integer(writer, 'mtu', obj.mtu)
5981        if obj.name is not None:
5982            Writer.write_string(writer, 'name', obj.name)
5983        if obj.port_isolation is not None:
5984            Writer.write_boolean(writer, 'port_isolation', obj.port_isolation)
5985        if obj.profile_required is not None:
5986            Writer.write_boolean(writer, 'profile_required', obj.profile_required)
5987        if obj.required is not None:
5988            Writer.write_boolean(writer, 'required', obj.required)
5989        if obj.status is not None:
5990            Writer.write_string(writer, 'status', obj.status.value)
5991        if obj.stp is not None:
5992            Writer.write_boolean(writer, 'stp', obj.stp)
5993        if obj.usages is not None:
5994            writer.write_start('usages')
5995            for item in obj.usages:
5996                if item is not None:
5997                    Writer.write_string(writer, 'usage', item.value)
5998            writer.write_end()
5999        if obj.vdsm_name is not None:
6000            Writer.write_string(writer, 'vdsm_name', obj.vdsm_name)
6001        if obj.vlan is not None:
6002            VlanWriter.write_one(obj.vlan, writer, 'vlan')
6003        if obj.cluster is not None:
6004            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
6005        if obj.data_center is not None:
6006            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
6007        if obj.external_provider is not None:
6008            OpenStackNetworkProviderWriter.write_one(obj.external_provider, writer, 'external_provider')
6009        if obj.external_provider_physical_network is not None:
6010            NetworkWriter.write_one(obj.external_provider_physical_network, writer, 'external_provider_physical_network')
6011        if obj.network_labels is not None:
6012            NetworkLabelWriter.write_many(obj.network_labels, writer, 'network_label', 'network_labels')
6013        if obj.permissions is not None:
6014            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
6015        if obj.qos is not None:
6016            QosWriter.write_one(obj.qos, writer, 'qos')
6017        if obj.vnic_profiles is not None:
6018            VnicProfileWriter.write_many(obj.vnic_profiles, writer, 'vnic_profile', 'vnic_profiles')
6019        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6021    @staticmethod
6022    def write_many(objs, writer, singular=None, plural=None):
6023        if singular is None:
6024            singular = 'network'
6025        if plural is None:
6026            plural = 'networks'
6027        writer.write_start(plural)
6028        if type(objs) == List:
6029            href = objs.href
6030            if href is not None:
6031                writer.write_attribute('href', href)
6032        for obj in objs:
6033            NetworkWriter.write_one(obj, writer, singular)
6034        writer.write_end()
class NetworkAttachmentWriter(ovirtsdk4.writer.Writer):
6037class NetworkAttachmentWriter(Writer):
6038
6039    def __init__(self):
6040        super(NetworkAttachmentWriter, self).__init__()
6041
6042    @staticmethod
6043    def write_one(obj, writer, singular=None):
6044        if singular is None:
6045            singular = 'network_attachment'
6046        writer.write_start(singular)
6047        href = obj.href
6048        if href is not None:
6049            writer.write_attribute('href', href)
6050        if obj.id is not None:
6051            writer.write_attribute('id', obj.id)
6052        if obj.comment is not None:
6053            Writer.write_string(writer, 'comment', obj.comment)
6054        if obj.description is not None:
6055            Writer.write_string(writer, 'description', obj.description)
6056        if obj.dns_resolver_configuration is not None:
6057            DnsResolverConfigurationWriter.write_one(obj.dns_resolver_configuration, writer, 'dns_resolver_configuration')
6058        if obj.in_sync is not None:
6059            Writer.write_boolean(writer, 'in_sync', obj.in_sync)
6060        if obj.ip_address_assignments is not None:
6061            IpAddressAssignmentWriter.write_many(obj.ip_address_assignments, writer, 'ip_address_assignment', 'ip_address_assignments')
6062        if obj.name is not None:
6063            Writer.write_string(writer, 'name', obj.name)
6064        if obj.properties is not None:
6065            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
6066        if obj.reported_configurations is not None:
6067            ReportedConfigurationWriter.write_many(obj.reported_configurations, writer, 'reported_configuration', 'reported_configurations')
6068        if obj.host is not None:
6069            HostWriter.write_one(obj.host, writer, 'host')
6070        if obj.host_nic is not None:
6071            HostNicWriter.write_one(obj.host_nic, writer, 'host_nic')
6072        if obj.network is not None:
6073            NetworkWriter.write_one(obj.network, writer, 'network')
6074        if obj.qos is not None:
6075            QosWriter.write_one(obj.qos, writer, 'qos')
6076        writer.write_end()
6077
6078    @staticmethod
6079    def write_many(objs, writer, singular=None, plural=None):
6080        if singular is None:
6081            singular = 'network_attachment'
6082        if plural is None:
6083            plural = 'network_attachments'
6084        writer.write_start(plural)
6085        if type(objs) == List:
6086            href = objs.href
6087            if href is not None:
6088                writer.write_attribute('href', href)
6089        for obj in objs:
6090            NetworkAttachmentWriter.write_one(obj, writer, singular)
6091        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

NetworkAttachmentWriter()
6039    def __init__(self):
6040        super(NetworkAttachmentWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6042    @staticmethod
6043    def write_one(obj, writer, singular=None):
6044        if singular is None:
6045            singular = 'network_attachment'
6046        writer.write_start(singular)
6047        href = obj.href
6048        if href is not None:
6049            writer.write_attribute('href', href)
6050        if obj.id is not None:
6051            writer.write_attribute('id', obj.id)
6052        if obj.comment is not None:
6053            Writer.write_string(writer, 'comment', obj.comment)
6054        if obj.description is not None:
6055            Writer.write_string(writer, 'description', obj.description)
6056        if obj.dns_resolver_configuration is not None:
6057            DnsResolverConfigurationWriter.write_one(obj.dns_resolver_configuration, writer, 'dns_resolver_configuration')
6058        if obj.in_sync is not None:
6059            Writer.write_boolean(writer, 'in_sync', obj.in_sync)
6060        if obj.ip_address_assignments is not None:
6061            IpAddressAssignmentWriter.write_many(obj.ip_address_assignments, writer, 'ip_address_assignment', 'ip_address_assignments')
6062        if obj.name is not None:
6063            Writer.write_string(writer, 'name', obj.name)
6064        if obj.properties is not None:
6065            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
6066        if obj.reported_configurations is not None:
6067            ReportedConfigurationWriter.write_many(obj.reported_configurations, writer, 'reported_configuration', 'reported_configurations')
6068        if obj.host is not None:
6069            HostWriter.write_one(obj.host, writer, 'host')
6070        if obj.host_nic is not None:
6071            HostNicWriter.write_one(obj.host_nic, writer, 'host_nic')
6072        if obj.network is not None:
6073            NetworkWriter.write_one(obj.network, writer, 'network')
6074        if obj.qos is not None:
6075            QosWriter.write_one(obj.qos, writer, 'qos')
6076        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6078    @staticmethod
6079    def write_many(objs, writer, singular=None, plural=None):
6080        if singular is None:
6081            singular = 'network_attachment'
6082        if plural is None:
6083            plural = 'network_attachments'
6084        writer.write_start(plural)
6085        if type(objs) == List:
6086            href = objs.href
6087            if href is not None:
6088                writer.write_attribute('href', href)
6089        for obj in objs:
6090            NetworkAttachmentWriter.write_one(obj, writer, singular)
6091        writer.write_end()
class NetworkConfigurationWriter(ovirtsdk4.writer.Writer):
6094class NetworkConfigurationWriter(Writer):
6095
6096    def __init__(self):
6097        super(NetworkConfigurationWriter, self).__init__()
6098
6099    @staticmethod
6100    def write_one(obj, writer, singular=None):
6101        if singular is None:
6102            singular = 'network_configuration'
6103        writer.write_start(singular)
6104        href = obj.href
6105        if href is not None:
6106            writer.write_attribute('href', href)
6107        if obj.dns is not None:
6108            DnsWriter.write_one(obj.dns, writer, 'dns')
6109        if obj.nics is not None:
6110            NicWriter.write_many(obj.nics, writer, 'nic', 'nics')
6111        writer.write_end()
6112
6113    @staticmethod
6114    def write_many(objs, writer, singular=None, plural=None):
6115        if singular is None:
6116            singular = 'network_configuration'
6117        if plural is None:
6118            plural = 'network_configurations'
6119        writer.write_start(plural)
6120        if type(objs) == List:
6121            href = objs.href
6122            if href is not None:
6123                writer.write_attribute('href', href)
6124        for obj in objs:
6125            NetworkConfigurationWriter.write_one(obj, writer, singular)
6126        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

NetworkConfigurationWriter()
6096    def __init__(self):
6097        super(NetworkConfigurationWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6099    @staticmethod
6100    def write_one(obj, writer, singular=None):
6101        if singular is None:
6102            singular = 'network_configuration'
6103        writer.write_start(singular)
6104        href = obj.href
6105        if href is not None:
6106            writer.write_attribute('href', href)
6107        if obj.dns is not None:
6108            DnsWriter.write_one(obj.dns, writer, 'dns')
6109        if obj.nics is not None:
6110            NicWriter.write_many(obj.nics, writer, 'nic', 'nics')
6111        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6113    @staticmethod
6114    def write_many(objs, writer, singular=None, plural=None):
6115        if singular is None:
6116            singular = 'network_configuration'
6117        if plural is None:
6118            plural = 'network_configurations'
6119        writer.write_start(plural)
6120        if type(objs) == List:
6121            href = objs.href
6122            if href is not None:
6123                writer.write_attribute('href', href)
6124        for obj in objs:
6125            NetworkConfigurationWriter.write_one(obj, writer, singular)
6126        writer.write_end()
class NetworkFilterWriter(ovirtsdk4.writer.Writer):
6129class NetworkFilterWriter(Writer):
6130
6131    def __init__(self):
6132        super(NetworkFilterWriter, self).__init__()
6133
6134    @staticmethod
6135    def write_one(obj, writer, singular=None):
6136        if singular is None:
6137            singular = 'network_filter'
6138        writer.write_start(singular)
6139        href = obj.href
6140        if href is not None:
6141            writer.write_attribute('href', href)
6142        if obj.id is not None:
6143            writer.write_attribute('id', obj.id)
6144        if obj.comment is not None:
6145            Writer.write_string(writer, 'comment', obj.comment)
6146        if obj.description is not None:
6147            Writer.write_string(writer, 'description', obj.description)
6148        if obj.name is not None:
6149            Writer.write_string(writer, 'name', obj.name)
6150        if obj.version is not None:
6151            VersionWriter.write_one(obj.version, writer, 'version')
6152        writer.write_end()
6153
6154    @staticmethod
6155    def write_many(objs, writer, singular=None, plural=None):
6156        if singular is None:
6157            singular = 'network_filter'
6158        if plural is None:
6159            plural = 'network_filters'
6160        writer.write_start(plural)
6161        if type(objs) == List:
6162            href = objs.href
6163            if href is not None:
6164                writer.write_attribute('href', href)
6165        for obj in objs:
6166            NetworkFilterWriter.write_one(obj, writer, singular)
6167        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

NetworkFilterWriter()
6131    def __init__(self):
6132        super(NetworkFilterWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6134    @staticmethod
6135    def write_one(obj, writer, singular=None):
6136        if singular is None:
6137            singular = 'network_filter'
6138        writer.write_start(singular)
6139        href = obj.href
6140        if href is not None:
6141            writer.write_attribute('href', href)
6142        if obj.id is not None:
6143            writer.write_attribute('id', obj.id)
6144        if obj.comment is not None:
6145            Writer.write_string(writer, 'comment', obj.comment)
6146        if obj.description is not None:
6147            Writer.write_string(writer, 'description', obj.description)
6148        if obj.name is not None:
6149            Writer.write_string(writer, 'name', obj.name)
6150        if obj.version is not None:
6151            VersionWriter.write_one(obj.version, writer, 'version')
6152        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6154    @staticmethod
6155    def write_many(objs, writer, singular=None, plural=None):
6156        if singular is None:
6157            singular = 'network_filter'
6158        if plural is None:
6159            plural = 'network_filters'
6160        writer.write_start(plural)
6161        if type(objs) == List:
6162            href = objs.href
6163            if href is not None:
6164                writer.write_attribute('href', href)
6165        for obj in objs:
6166            NetworkFilterWriter.write_one(obj, writer, singular)
6167        writer.write_end()
class NetworkFilterParameterWriter(ovirtsdk4.writer.Writer):
6170class NetworkFilterParameterWriter(Writer):
6171
6172    def __init__(self):
6173        super(NetworkFilterParameterWriter, self).__init__()
6174
6175    @staticmethod
6176    def write_one(obj, writer, singular=None):
6177        if singular is None:
6178            singular = 'network_filter_parameter'
6179        writer.write_start(singular)
6180        href = obj.href
6181        if href is not None:
6182            writer.write_attribute('href', href)
6183        if obj.id is not None:
6184            writer.write_attribute('id', obj.id)
6185        if obj.comment is not None:
6186            Writer.write_string(writer, 'comment', obj.comment)
6187        if obj.description is not None:
6188            Writer.write_string(writer, 'description', obj.description)
6189        if obj.name is not None:
6190            Writer.write_string(writer, 'name', obj.name)
6191        if obj.value is not None:
6192            Writer.write_string(writer, 'value', obj.value)
6193        if obj.nic is not None:
6194            NicWriter.write_one(obj.nic, writer, 'nic')
6195        writer.write_end()
6196
6197    @staticmethod
6198    def write_many(objs, writer, singular=None, plural=None):
6199        if singular is None:
6200            singular = 'network_filter_parameter'
6201        if plural is None:
6202            plural = 'network_filter_parameters'
6203        writer.write_start(plural)
6204        if type(objs) == List:
6205            href = objs.href
6206            if href is not None:
6207                writer.write_attribute('href', href)
6208        for obj in objs:
6209            NetworkFilterParameterWriter.write_one(obj, writer, singular)
6210        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

NetworkFilterParameterWriter()
6172    def __init__(self):
6173        super(NetworkFilterParameterWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6175    @staticmethod
6176    def write_one(obj, writer, singular=None):
6177        if singular is None:
6178            singular = 'network_filter_parameter'
6179        writer.write_start(singular)
6180        href = obj.href
6181        if href is not None:
6182            writer.write_attribute('href', href)
6183        if obj.id is not None:
6184            writer.write_attribute('id', obj.id)
6185        if obj.comment is not None:
6186            Writer.write_string(writer, 'comment', obj.comment)
6187        if obj.description is not None:
6188            Writer.write_string(writer, 'description', obj.description)
6189        if obj.name is not None:
6190            Writer.write_string(writer, 'name', obj.name)
6191        if obj.value is not None:
6192            Writer.write_string(writer, 'value', obj.value)
6193        if obj.nic is not None:
6194            NicWriter.write_one(obj.nic, writer, 'nic')
6195        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6197    @staticmethod
6198    def write_many(objs, writer, singular=None, plural=None):
6199        if singular is None:
6200            singular = 'network_filter_parameter'
6201        if plural is None:
6202            plural = 'network_filter_parameters'
6203        writer.write_start(plural)
6204        if type(objs) == List:
6205            href = objs.href
6206            if href is not None:
6207                writer.write_attribute('href', href)
6208        for obj in objs:
6209            NetworkFilterParameterWriter.write_one(obj, writer, singular)
6210        writer.write_end()
class NetworkLabelWriter(ovirtsdk4.writer.Writer):
6213class NetworkLabelWriter(Writer):
6214
6215    def __init__(self):
6216        super(NetworkLabelWriter, self).__init__()
6217
6218    @staticmethod
6219    def write_one(obj, writer, singular=None):
6220        if singular is None:
6221            singular = 'network_label'
6222        writer.write_start(singular)
6223        href = obj.href
6224        if href is not None:
6225            writer.write_attribute('href', href)
6226        if obj.id is not None:
6227            writer.write_attribute('id', obj.id)
6228        if obj.comment is not None:
6229            Writer.write_string(writer, 'comment', obj.comment)
6230        if obj.description is not None:
6231            Writer.write_string(writer, 'description', obj.description)
6232        if obj.name is not None:
6233            Writer.write_string(writer, 'name', obj.name)
6234        if obj.host_nic is not None:
6235            HostNicWriter.write_one(obj.host_nic, writer, 'host_nic')
6236        if obj.network is not None:
6237            NetworkWriter.write_one(obj.network, writer, 'network')
6238        writer.write_end()
6239
6240    @staticmethod
6241    def write_many(objs, writer, singular=None, plural=None):
6242        if singular is None:
6243            singular = 'network_label'
6244        if plural is None:
6245            plural = 'network_labels'
6246        writer.write_start(plural)
6247        if type(objs) == List:
6248            href = objs.href
6249            if href is not None:
6250                writer.write_attribute('href', href)
6251        for obj in objs:
6252            NetworkLabelWriter.write_one(obj, writer, singular)
6253        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

NetworkLabelWriter()
6215    def __init__(self):
6216        super(NetworkLabelWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6218    @staticmethod
6219    def write_one(obj, writer, singular=None):
6220        if singular is None:
6221            singular = 'network_label'
6222        writer.write_start(singular)
6223        href = obj.href
6224        if href is not None:
6225            writer.write_attribute('href', href)
6226        if obj.id is not None:
6227            writer.write_attribute('id', obj.id)
6228        if obj.comment is not None:
6229            Writer.write_string(writer, 'comment', obj.comment)
6230        if obj.description is not None:
6231            Writer.write_string(writer, 'description', obj.description)
6232        if obj.name is not None:
6233            Writer.write_string(writer, 'name', obj.name)
6234        if obj.host_nic is not None:
6235            HostNicWriter.write_one(obj.host_nic, writer, 'host_nic')
6236        if obj.network is not None:
6237            NetworkWriter.write_one(obj.network, writer, 'network')
6238        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6240    @staticmethod
6241    def write_many(objs, writer, singular=None, plural=None):
6242        if singular is None:
6243            singular = 'network_label'
6244        if plural is None:
6245            plural = 'network_labels'
6246        writer.write_start(plural)
6247        if type(objs) == List:
6248            href = objs.href
6249            if href is not None:
6250                writer.write_attribute('href', href)
6251        for obj in objs:
6252            NetworkLabelWriter.write_one(obj, writer, singular)
6253        writer.write_end()
class NfsProfileDetailWriter(ovirtsdk4.writer.Writer):
6256class NfsProfileDetailWriter(Writer):
6257
6258    def __init__(self):
6259        super(NfsProfileDetailWriter, self).__init__()
6260
6261    @staticmethod
6262    def write_one(obj, writer, singular=None):
6263        if singular is None:
6264            singular = 'nfs_profile_detail'
6265        writer.write_start(singular)
6266        href = obj.href
6267        if href is not None:
6268            writer.write_attribute('href', href)
6269        if obj.nfs_server_ip is not None:
6270            Writer.write_string(writer, 'nfs_server_ip', obj.nfs_server_ip)
6271        if obj.profile_details is not None:
6272            ProfileDetailWriter.write_many(obj.profile_details, writer, 'profile_detail', 'profile_details')
6273        writer.write_end()
6274
6275    @staticmethod
6276    def write_many(objs, writer, singular=None, plural=None):
6277        if singular is None:
6278            singular = 'nfs_profile_detail'
6279        if plural is None:
6280            plural = 'nfs_profile_details'
6281        writer.write_start(plural)
6282        if type(objs) == List:
6283            href = objs.href
6284            if href is not None:
6285                writer.write_attribute('href', href)
6286        for obj in objs:
6287            NfsProfileDetailWriter.write_one(obj, writer, singular)
6288        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

NfsProfileDetailWriter()
6258    def __init__(self):
6259        super(NfsProfileDetailWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6261    @staticmethod
6262    def write_one(obj, writer, singular=None):
6263        if singular is None:
6264            singular = 'nfs_profile_detail'
6265        writer.write_start(singular)
6266        href = obj.href
6267        if href is not None:
6268            writer.write_attribute('href', href)
6269        if obj.nfs_server_ip is not None:
6270            Writer.write_string(writer, 'nfs_server_ip', obj.nfs_server_ip)
6271        if obj.profile_details is not None:
6272            ProfileDetailWriter.write_many(obj.profile_details, writer, 'profile_detail', 'profile_details')
6273        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6275    @staticmethod
6276    def write_many(objs, writer, singular=None, plural=None):
6277        if singular is None:
6278            singular = 'nfs_profile_detail'
6279        if plural is None:
6280            plural = 'nfs_profile_details'
6281        writer.write_start(plural)
6282        if type(objs) == List:
6283            href = objs.href
6284            if href is not None:
6285                writer.write_attribute('href', href)
6286        for obj in objs:
6287            NfsProfileDetailWriter.write_one(obj, writer, singular)
6288        writer.write_end()
class NicWriter(ovirtsdk4.writer.Writer):
6291class NicWriter(Writer):
6292
6293    def __init__(self):
6294        super(NicWriter, self).__init__()
6295
6296    @staticmethod
6297    def write_one(obj, writer, singular=None):
6298        if singular is None:
6299            singular = 'nic'
6300        writer.write_start(singular)
6301        href = obj.href
6302        if href is not None:
6303            writer.write_attribute('href', href)
6304        if obj.id is not None:
6305            writer.write_attribute('id', obj.id)
6306        if obj.boot_protocol is not None:
6307            Writer.write_string(writer, 'boot_protocol', obj.boot_protocol.value)
6308        if obj.comment is not None:
6309            Writer.write_string(writer, 'comment', obj.comment)
6310        if obj.description is not None:
6311            Writer.write_string(writer, 'description', obj.description)
6312        if obj.interface is not None:
6313            Writer.write_string(writer, 'interface', obj.interface.value)
6314        if obj.linked is not None:
6315            Writer.write_boolean(writer, 'linked', obj.linked)
6316        if obj.mac is not None:
6317            MacWriter.write_one(obj.mac, writer, 'mac')
6318        if obj.name is not None:
6319            Writer.write_string(writer, 'name', obj.name)
6320        if obj.on_boot is not None:
6321            Writer.write_boolean(writer, 'on_boot', obj.on_boot)
6322        if obj.plugged is not None:
6323            Writer.write_boolean(writer, 'plugged', obj.plugged)
6324        if obj.synced is not None:
6325            Writer.write_boolean(writer, 'synced', obj.synced)
6326        if obj.instance_type is not None:
6327            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
6328        if obj.network is not None:
6329            NetworkWriter.write_one(obj.network, writer, 'network')
6330        if obj.network_attachments is not None:
6331            NetworkAttachmentWriter.write_many(obj.network_attachments, writer, 'network_attachment', 'network_attachments')
6332        if obj.network_filter_parameters is not None:
6333            NetworkFilterParameterWriter.write_many(obj.network_filter_parameters, writer, 'network_filter_parameter', 'network_filter_parameters')
6334        if obj.network_labels is not None:
6335            NetworkLabelWriter.write_many(obj.network_labels, writer, 'network_label', 'network_labels')
6336        if obj.reported_devices is not None:
6337            ReportedDeviceWriter.write_many(obj.reported_devices, writer, 'reported_device', 'reported_devices')
6338        if obj.statistics is not None:
6339            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
6340        if obj.template is not None:
6341            TemplateWriter.write_one(obj.template, writer, 'template')
6342        if obj.virtual_function_allowed_labels is not None:
6343            NetworkLabelWriter.write_many(obj.virtual_function_allowed_labels, writer, 'network_label', 'virtual_function_allowed_labels')
6344        if obj.virtual_function_allowed_networks is not None:
6345            NetworkWriter.write_many(obj.virtual_function_allowed_networks, writer, 'network', 'virtual_function_allowed_networks')
6346        if obj.vm is not None:
6347            VmWriter.write_one(obj.vm, writer, 'vm')
6348        if obj.vms is not None:
6349            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
6350        if obj.vnic_profile is not None:
6351            VnicProfileWriter.write_one(obj.vnic_profile, writer, 'vnic_profile')
6352        writer.write_end()
6353
6354    @staticmethod
6355    def write_many(objs, writer, singular=None, plural=None):
6356        if singular is None:
6357            singular = 'nic'
6358        if plural is None:
6359            plural = 'nics'
6360        writer.write_start(plural)
6361        if type(objs) == List:
6362            href = objs.href
6363            if href is not None:
6364                writer.write_attribute('href', href)
6365        for obj in objs:
6366            NicWriter.write_one(obj, writer, singular)
6367        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

NicWriter()
6293    def __init__(self):
6294        super(NicWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6296    @staticmethod
6297    def write_one(obj, writer, singular=None):
6298        if singular is None:
6299            singular = 'nic'
6300        writer.write_start(singular)
6301        href = obj.href
6302        if href is not None:
6303            writer.write_attribute('href', href)
6304        if obj.id is not None:
6305            writer.write_attribute('id', obj.id)
6306        if obj.boot_protocol is not None:
6307            Writer.write_string(writer, 'boot_protocol', obj.boot_protocol.value)
6308        if obj.comment is not None:
6309            Writer.write_string(writer, 'comment', obj.comment)
6310        if obj.description is not None:
6311            Writer.write_string(writer, 'description', obj.description)
6312        if obj.interface is not None:
6313            Writer.write_string(writer, 'interface', obj.interface.value)
6314        if obj.linked is not None:
6315            Writer.write_boolean(writer, 'linked', obj.linked)
6316        if obj.mac is not None:
6317            MacWriter.write_one(obj.mac, writer, 'mac')
6318        if obj.name is not None:
6319            Writer.write_string(writer, 'name', obj.name)
6320        if obj.on_boot is not None:
6321            Writer.write_boolean(writer, 'on_boot', obj.on_boot)
6322        if obj.plugged is not None:
6323            Writer.write_boolean(writer, 'plugged', obj.plugged)
6324        if obj.synced is not None:
6325            Writer.write_boolean(writer, 'synced', obj.synced)
6326        if obj.instance_type is not None:
6327            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
6328        if obj.network is not None:
6329            NetworkWriter.write_one(obj.network, writer, 'network')
6330        if obj.network_attachments is not None:
6331            NetworkAttachmentWriter.write_many(obj.network_attachments, writer, 'network_attachment', 'network_attachments')
6332        if obj.network_filter_parameters is not None:
6333            NetworkFilterParameterWriter.write_many(obj.network_filter_parameters, writer, 'network_filter_parameter', 'network_filter_parameters')
6334        if obj.network_labels is not None:
6335            NetworkLabelWriter.write_many(obj.network_labels, writer, 'network_label', 'network_labels')
6336        if obj.reported_devices is not None:
6337            ReportedDeviceWriter.write_many(obj.reported_devices, writer, 'reported_device', 'reported_devices')
6338        if obj.statistics is not None:
6339            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
6340        if obj.template is not None:
6341            TemplateWriter.write_one(obj.template, writer, 'template')
6342        if obj.virtual_function_allowed_labels is not None:
6343            NetworkLabelWriter.write_many(obj.virtual_function_allowed_labels, writer, 'network_label', 'virtual_function_allowed_labels')
6344        if obj.virtual_function_allowed_networks is not None:
6345            NetworkWriter.write_many(obj.virtual_function_allowed_networks, writer, 'network', 'virtual_function_allowed_networks')
6346        if obj.vm is not None:
6347            VmWriter.write_one(obj.vm, writer, 'vm')
6348        if obj.vms is not None:
6349            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
6350        if obj.vnic_profile is not None:
6351            VnicProfileWriter.write_one(obj.vnic_profile, writer, 'vnic_profile')
6352        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6354    @staticmethod
6355    def write_many(objs, writer, singular=None, plural=None):
6356        if singular is None:
6357            singular = 'nic'
6358        if plural is None:
6359            plural = 'nics'
6360        writer.write_start(plural)
6361        if type(objs) == List:
6362            href = objs.href
6363            if href is not None:
6364                writer.write_attribute('href', href)
6365        for obj in objs:
6366            NicWriter.write_one(obj, writer, singular)
6367        writer.write_end()
class NicConfigurationWriter(ovirtsdk4.writer.Writer):
6370class NicConfigurationWriter(Writer):
6371
6372    def __init__(self):
6373        super(NicConfigurationWriter, self).__init__()
6374
6375    @staticmethod
6376    def write_one(obj, writer, singular=None):
6377        if singular is None:
6378            singular = 'nic_configuration'
6379        writer.write_start(singular)
6380        href = obj.href
6381        if href is not None:
6382            writer.write_attribute('href', href)
6383        if obj.boot_protocol is not None:
6384            Writer.write_string(writer, 'boot_protocol', obj.boot_protocol.value)
6385        if obj.ip is not None:
6386            IpWriter.write_one(obj.ip, writer, 'ip')
6387        if obj.ipv6 is not None:
6388            IpWriter.write_one(obj.ipv6, writer, 'ipv6')
6389        if obj.ipv6_boot_protocol is not None:
6390            Writer.write_string(writer, 'ipv6_boot_protocol', obj.ipv6_boot_protocol.value)
6391        if obj.name is not None:
6392            Writer.write_string(writer, 'name', obj.name)
6393        if obj.on_boot is not None:
6394            Writer.write_boolean(writer, 'on_boot', obj.on_boot)
6395        writer.write_end()
6396
6397    @staticmethod
6398    def write_many(objs, writer, singular=None, plural=None):
6399        if singular is None:
6400            singular = 'nic_configuration'
6401        if plural is None:
6402            plural = 'nic_configurations'
6403        writer.write_start(plural)
6404        if type(objs) == List:
6405            href = objs.href
6406            if href is not None:
6407                writer.write_attribute('href', href)
6408        for obj in objs:
6409            NicConfigurationWriter.write_one(obj, writer, singular)
6410        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

NicConfigurationWriter()
6372    def __init__(self):
6373        super(NicConfigurationWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6375    @staticmethod
6376    def write_one(obj, writer, singular=None):
6377        if singular is None:
6378            singular = 'nic_configuration'
6379        writer.write_start(singular)
6380        href = obj.href
6381        if href is not None:
6382            writer.write_attribute('href', href)
6383        if obj.boot_protocol is not None:
6384            Writer.write_string(writer, 'boot_protocol', obj.boot_protocol.value)
6385        if obj.ip is not None:
6386            IpWriter.write_one(obj.ip, writer, 'ip')
6387        if obj.ipv6 is not None:
6388            IpWriter.write_one(obj.ipv6, writer, 'ipv6')
6389        if obj.ipv6_boot_protocol is not None:
6390            Writer.write_string(writer, 'ipv6_boot_protocol', obj.ipv6_boot_protocol.value)
6391        if obj.name is not None:
6392            Writer.write_string(writer, 'name', obj.name)
6393        if obj.on_boot is not None:
6394            Writer.write_boolean(writer, 'on_boot', obj.on_boot)
6395        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6397    @staticmethod
6398    def write_many(objs, writer, singular=None, plural=None):
6399        if singular is None:
6400            singular = 'nic_configuration'
6401        if plural is None:
6402            plural = 'nic_configurations'
6403        writer.write_start(plural)
6404        if type(objs) == List:
6405            href = objs.href
6406            if href is not None:
6407                writer.write_attribute('href', href)
6408        for obj in objs:
6409            NicConfigurationWriter.write_one(obj, writer, singular)
6410        writer.write_end()
class NumaNodeWriter(ovirtsdk4.writer.Writer):
6413class NumaNodeWriter(Writer):
6414
6415    def __init__(self):
6416        super(NumaNodeWriter, self).__init__()
6417
6418    @staticmethod
6419    def write_one(obj, writer, singular=None):
6420        if singular is None:
6421            singular = 'host_numa_node'
6422        writer.write_start(singular)
6423        href = obj.href
6424        if href is not None:
6425            writer.write_attribute('href', href)
6426        if obj.id is not None:
6427            writer.write_attribute('id', obj.id)
6428        if obj.comment is not None:
6429            Writer.write_string(writer, 'comment', obj.comment)
6430        if obj.cpu is not None:
6431            CpuWriter.write_one(obj.cpu, writer, 'cpu')
6432        if obj.description is not None:
6433            Writer.write_string(writer, 'description', obj.description)
6434        if obj.index is not None:
6435            Writer.write_integer(writer, 'index', obj.index)
6436        if obj.memory is not None:
6437            Writer.write_integer(writer, 'memory', obj.memory)
6438        if obj.name is not None:
6439            Writer.write_string(writer, 'name', obj.name)
6440        if obj.node_distance is not None:
6441            Writer.write_string(writer, 'node_distance', obj.node_distance)
6442        if obj.host is not None:
6443            HostWriter.write_one(obj.host, writer, 'host')
6444        if obj.statistics is not None:
6445            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
6446        writer.write_end()
6447
6448    @staticmethod
6449    def write_many(objs, writer, singular=None, plural=None):
6450        if singular is None:
6451            singular = 'host_numa_node'
6452        if plural is None:
6453            plural = 'host_numa_nodes'
6454        writer.write_start(plural)
6455        if type(objs) == List:
6456            href = objs.href
6457            if href is not None:
6458                writer.write_attribute('href', href)
6459        for obj in objs:
6460            NumaNodeWriter.write_one(obj, writer, singular)
6461        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

NumaNodeWriter()
6415    def __init__(self):
6416        super(NumaNodeWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6418    @staticmethod
6419    def write_one(obj, writer, singular=None):
6420        if singular is None:
6421            singular = 'host_numa_node'
6422        writer.write_start(singular)
6423        href = obj.href
6424        if href is not None:
6425            writer.write_attribute('href', href)
6426        if obj.id is not None:
6427            writer.write_attribute('id', obj.id)
6428        if obj.comment is not None:
6429            Writer.write_string(writer, 'comment', obj.comment)
6430        if obj.cpu is not None:
6431            CpuWriter.write_one(obj.cpu, writer, 'cpu')
6432        if obj.description is not None:
6433            Writer.write_string(writer, 'description', obj.description)
6434        if obj.index is not None:
6435            Writer.write_integer(writer, 'index', obj.index)
6436        if obj.memory is not None:
6437            Writer.write_integer(writer, 'memory', obj.memory)
6438        if obj.name is not None:
6439            Writer.write_string(writer, 'name', obj.name)
6440        if obj.node_distance is not None:
6441            Writer.write_string(writer, 'node_distance', obj.node_distance)
6442        if obj.host is not None:
6443            HostWriter.write_one(obj.host, writer, 'host')
6444        if obj.statistics is not None:
6445            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
6446        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6448    @staticmethod
6449    def write_many(objs, writer, singular=None, plural=None):
6450        if singular is None:
6451            singular = 'host_numa_node'
6452        if plural is None:
6453            plural = 'host_numa_nodes'
6454        writer.write_start(plural)
6455        if type(objs) == List:
6456            href = objs.href
6457            if href is not None:
6458                writer.write_attribute('href', href)
6459        for obj in objs:
6460            NumaNodeWriter.write_one(obj, writer, singular)
6461        writer.write_end()
class NumaNodePinWriter(ovirtsdk4.writer.Writer):
6464class NumaNodePinWriter(Writer):
6465
6466    def __init__(self):
6467        super(NumaNodePinWriter, self).__init__()
6468
6469    @staticmethod
6470    def write_one(obj, writer, singular=None):
6471        if singular is None:
6472            singular = 'numa_node_pin'
6473        writer.write_start(singular)
6474        href = obj.href
6475        if href is not None:
6476            writer.write_attribute('href', href)
6477        if obj.host_numa_node is not None:
6478            NumaNodeWriter.write_one(obj.host_numa_node, writer, 'host_numa_node')
6479        if obj.index is not None:
6480            Writer.write_integer(writer, 'index', obj.index)
6481        if obj.pinned is not None:
6482            Writer.write_boolean(writer, 'pinned', obj.pinned)
6483        writer.write_end()
6484
6485    @staticmethod
6486    def write_many(objs, writer, singular=None, plural=None):
6487        if singular is None:
6488            singular = 'numa_node_pin'
6489        if plural is None:
6490            plural = 'numa_node_pins'
6491        writer.write_start(plural)
6492        if type(objs) == List:
6493            href = objs.href
6494            if href is not None:
6495                writer.write_attribute('href', href)
6496        for obj in objs:
6497            NumaNodePinWriter.write_one(obj, writer, singular)
6498        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

NumaNodePinWriter()
6466    def __init__(self):
6467        super(NumaNodePinWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6469    @staticmethod
6470    def write_one(obj, writer, singular=None):
6471        if singular is None:
6472            singular = 'numa_node_pin'
6473        writer.write_start(singular)
6474        href = obj.href
6475        if href is not None:
6476            writer.write_attribute('href', href)
6477        if obj.host_numa_node is not None:
6478            NumaNodeWriter.write_one(obj.host_numa_node, writer, 'host_numa_node')
6479        if obj.index is not None:
6480            Writer.write_integer(writer, 'index', obj.index)
6481        if obj.pinned is not None:
6482            Writer.write_boolean(writer, 'pinned', obj.pinned)
6483        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6485    @staticmethod
6486    def write_many(objs, writer, singular=None, plural=None):
6487        if singular is None:
6488            singular = 'numa_node_pin'
6489        if plural is None:
6490            plural = 'numa_node_pins'
6491        writer.write_start(plural)
6492        if type(objs) == List:
6493            href = objs.href
6494            if href is not None:
6495                writer.write_attribute('href', href)
6496        for obj in objs:
6497            NumaNodePinWriter.write_one(obj, writer, singular)
6498        writer.write_end()
class OpenStackImageWriter(ovirtsdk4.writer.Writer):
6501class OpenStackImageWriter(Writer):
6502
6503    def __init__(self):
6504        super(OpenStackImageWriter, self).__init__()
6505
6506    @staticmethod
6507    def write_one(obj, writer, singular=None):
6508        if singular is None:
6509            singular = 'openstack_image'
6510        writer.write_start(singular)
6511        href = obj.href
6512        if href is not None:
6513            writer.write_attribute('href', href)
6514        if obj.id is not None:
6515            writer.write_attribute('id', obj.id)
6516        if obj.comment is not None:
6517            Writer.write_string(writer, 'comment', obj.comment)
6518        if obj.description is not None:
6519            Writer.write_string(writer, 'description', obj.description)
6520        if obj.name is not None:
6521            Writer.write_string(writer, 'name', obj.name)
6522        if obj.openstack_image_provider is not None:
6523            OpenStackImageProviderWriter.write_one(obj.openstack_image_provider, writer, 'openstack_image_provider')
6524        writer.write_end()
6525
6526    @staticmethod
6527    def write_many(objs, writer, singular=None, plural=None):
6528        if singular is None:
6529            singular = 'openstack_image'
6530        if plural is None:
6531            plural = 'openstack_images'
6532        writer.write_start(plural)
6533        if type(objs) == List:
6534            href = objs.href
6535            if href is not None:
6536                writer.write_attribute('href', href)
6537        for obj in objs:
6538            OpenStackImageWriter.write_one(obj, writer, singular)
6539        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

OpenStackImageWriter()
6503    def __init__(self):
6504        super(OpenStackImageWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6506    @staticmethod
6507    def write_one(obj, writer, singular=None):
6508        if singular is None:
6509            singular = 'openstack_image'
6510        writer.write_start(singular)
6511        href = obj.href
6512        if href is not None:
6513            writer.write_attribute('href', href)
6514        if obj.id is not None:
6515            writer.write_attribute('id', obj.id)
6516        if obj.comment is not None:
6517            Writer.write_string(writer, 'comment', obj.comment)
6518        if obj.description is not None:
6519            Writer.write_string(writer, 'description', obj.description)
6520        if obj.name is not None:
6521            Writer.write_string(writer, 'name', obj.name)
6522        if obj.openstack_image_provider is not None:
6523            OpenStackImageProviderWriter.write_one(obj.openstack_image_provider, writer, 'openstack_image_provider')
6524        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6526    @staticmethod
6527    def write_many(objs, writer, singular=None, plural=None):
6528        if singular is None:
6529            singular = 'openstack_image'
6530        if plural is None:
6531            plural = 'openstack_images'
6532        writer.write_start(plural)
6533        if type(objs) == List:
6534            href = objs.href
6535            if href is not None:
6536                writer.write_attribute('href', href)
6537        for obj in objs:
6538            OpenStackImageWriter.write_one(obj, writer, singular)
6539        writer.write_end()
class OpenStackImageProviderWriter(ovirtsdk4.writer.Writer):
6542class OpenStackImageProviderWriter(Writer):
6543
6544    def __init__(self):
6545        super(OpenStackImageProviderWriter, self).__init__()
6546
6547    @staticmethod
6548    def write_one(obj, writer, singular=None):
6549        if singular is None:
6550            singular = 'openstack_image_provider'
6551        writer.write_start(singular)
6552        href = obj.href
6553        if href is not None:
6554            writer.write_attribute('href', href)
6555        if obj.id is not None:
6556            writer.write_attribute('id', obj.id)
6557        if obj.authentication_url is not None:
6558            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
6559        if obj.comment is not None:
6560            Writer.write_string(writer, 'comment', obj.comment)
6561        if obj.description is not None:
6562            Writer.write_string(writer, 'description', obj.description)
6563        if obj.name is not None:
6564            Writer.write_string(writer, 'name', obj.name)
6565        if obj.password is not None:
6566            Writer.write_string(writer, 'password', obj.password)
6567        if obj.properties is not None:
6568            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
6569        if obj.requires_authentication is not None:
6570            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
6571        if obj.tenant_name is not None:
6572            Writer.write_string(writer, 'tenant_name', obj.tenant_name)
6573        if obj.url is not None:
6574            Writer.write_string(writer, 'url', obj.url)
6575        if obj.username is not None:
6576            Writer.write_string(writer, 'username', obj.username)
6577        if obj.certificates is not None:
6578            CertificateWriter.write_many(obj.certificates, writer, 'certificate', 'certificates')
6579        if obj.images is not None:
6580            OpenStackImageWriter.write_many(obj.images, writer, 'openstack_image', 'images')
6581        writer.write_end()
6582
6583    @staticmethod
6584    def write_many(objs, writer, singular=None, plural=None):
6585        if singular is None:
6586            singular = 'openstack_image_provider'
6587        if plural is None:
6588            plural = 'openstack_image_providers'
6589        writer.write_start(plural)
6590        if type(objs) == List:
6591            href = objs.href
6592            if href is not None:
6593                writer.write_attribute('href', href)
6594        for obj in objs:
6595            OpenStackImageProviderWriter.write_one(obj, writer, singular)
6596        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

OpenStackImageProviderWriter()
6544    def __init__(self):
6545        super(OpenStackImageProviderWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6547    @staticmethod
6548    def write_one(obj, writer, singular=None):
6549        if singular is None:
6550            singular = 'openstack_image_provider'
6551        writer.write_start(singular)
6552        href = obj.href
6553        if href is not None:
6554            writer.write_attribute('href', href)
6555        if obj.id is not None:
6556            writer.write_attribute('id', obj.id)
6557        if obj.authentication_url is not None:
6558            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
6559        if obj.comment is not None:
6560            Writer.write_string(writer, 'comment', obj.comment)
6561        if obj.description is not None:
6562            Writer.write_string(writer, 'description', obj.description)
6563        if obj.name is not None:
6564            Writer.write_string(writer, 'name', obj.name)
6565        if obj.password is not None:
6566            Writer.write_string(writer, 'password', obj.password)
6567        if obj.properties is not None:
6568            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
6569        if obj.requires_authentication is not None:
6570            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
6571        if obj.tenant_name is not None:
6572            Writer.write_string(writer, 'tenant_name', obj.tenant_name)
6573        if obj.url is not None:
6574            Writer.write_string(writer, 'url', obj.url)
6575        if obj.username is not None:
6576            Writer.write_string(writer, 'username', obj.username)
6577        if obj.certificates is not None:
6578            CertificateWriter.write_many(obj.certificates, writer, 'certificate', 'certificates')
6579        if obj.images is not None:
6580            OpenStackImageWriter.write_many(obj.images, writer, 'openstack_image', 'images')
6581        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6583    @staticmethod
6584    def write_many(objs, writer, singular=None, plural=None):
6585        if singular is None:
6586            singular = 'openstack_image_provider'
6587        if plural is None:
6588            plural = 'openstack_image_providers'
6589        writer.write_start(plural)
6590        if type(objs) == List:
6591            href = objs.href
6592            if href is not None:
6593                writer.write_attribute('href', href)
6594        for obj in objs:
6595            OpenStackImageProviderWriter.write_one(obj, writer, singular)
6596        writer.write_end()
class OpenStackNetworkWriter(ovirtsdk4.writer.Writer):
6599class OpenStackNetworkWriter(Writer):
6600
6601    def __init__(self):
6602        super(OpenStackNetworkWriter, self).__init__()
6603
6604    @staticmethod
6605    def write_one(obj, writer, singular=None):
6606        if singular is None:
6607            singular = 'openstack_network'
6608        writer.write_start(singular)
6609        href = obj.href
6610        if href is not None:
6611            writer.write_attribute('href', href)
6612        if obj.id is not None:
6613            writer.write_attribute('id', obj.id)
6614        if obj.comment is not None:
6615            Writer.write_string(writer, 'comment', obj.comment)
6616        if obj.description is not None:
6617            Writer.write_string(writer, 'description', obj.description)
6618        if obj.name is not None:
6619            Writer.write_string(writer, 'name', obj.name)
6620        if obj.openstack_network_provider is not None:
6621            OpenStackNetworkProviderWriter.write_one(obj.openstack_network_provider, writer, 'openstack_network_provider')
6622        writer.write_end()
6623
6624    @staticmethod
6625    def write_many(objs, writer, singular=None, plural=None):
6626        if singular is None:
6627            singular = 'openstack_network'
6628        if plural is None:
6629            plural = 'openstack_networks'
6630        writer.write_start(plural)
6631        if type(objs) == List:
6632            href = objs.href
6633            if href is not None:
6634                writer.write_attribute('href', href)
6635        for obj in objs:
6636            OpenStackNetworkWriter.write_one(obj, writer, singular)
6637        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

OpenStackNetworkWriter()
6601    def __init__(self):
6602        super(OpenStackNetworkWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6604    @staticmethod
6605    def write_one(obj, writer, singular=None):
6606        if singular is None:
6607            singular = 'openstack_network'
6608        writer.write_start(singular)
6609        href = obj.href
6610        if href is not None:
6611            writer.write_attribute('href', href)
6612        if obj.id is not None:
6613            writer.write_attribute('id', obj.id)
6614        if obj.comment is not None:
6615            Writer.write_string(writer, 'comment', obj.comment)
6616        if obj.description is not None:
6617            Writer.write_string(writer, 'description', obj.description)
6618        if obj.name is not None:
6619            Writer.write_string(writer, 'name', obj.name)
6620        if obj.openstack_network_provider is not None:
6621            OpenStackNetworkProviderWriter.write_one(obj.openstack_network_provider, writer, 'openstack_network_provider')
6622        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6624    @staticmethod
6625    def write_many(objs, writer, singular=None, plural=None):
6626        if singular is None:
6627            singular = 'openstack_network'
6628        if plural is None:
6629            plural = 'openstack_networks'
6630        writer.write_start(plural)
6631        if type(objs) == List:
6632            href = objs.href
6633            if href is not None:
6634                writer.write_attribute('href', href)
6635        for obj in objs:
6636            OpenStackNetworkWriter.write_one(obj, writer, singular)
6637        writer.write_end()
class OpenStackNetworkProviderWriter(ovirtsdk4.writer.Writer):
6640class OpenStackNetworkProviderWriter(Writer):
6641
6642    def __init__(self):
6643        super(OpenStackNetworkProviderWriter, self).__init__()
6644
6645    @staticmethod
6646    def write_one(obj, writer, singular=None):
6647        if singular is None:
6648            singular = 'openstack_network_provider'
6649        writer.write_start(singular)
6650        href = obj.href
6651        if href is not None:
6652            writer.write_attribute('href', href)
6653        if obj.id is not None:
6654            writer.write_attribute('id', obj.id)
6655        if obj.agent_configuration is not None:
6656            AgentConfigurationWriter.write_one(obj.agent_configuration, writer, 'agent_configuration')
6657        if obj.authentication_url is not None:
6658            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
6659        if obj.auto_sync is not None:
6660            Writer.write_boolean(writer, 'auto_sync', obj.auto_sync)
6661        if obj.comment is not None:
6662            Writer.write_string(writer, 'comment', obj.comment)
6663        if obj.description is not None:
6664            Writer.write_string(writer, 'description', obj.description)
6665        if obj.external_plugin_type is not None:
6666            Writer.write_string(writer, 'external_plugin_type', obj.external_plugin_type)
6667        if obj.name is not None:
6668            Writer.write_string(writer, 'name', obj.name)
6669        if obj.password is not None:
6670            Writer.write_string(writer, 'password', obj.password)
6671        if obj.plugin_type is not None:
6672            Writer.write_string(writer, 'plugin_type', obj.plugin_type.value)
6673        if obj.project_domain_name is not None:
6674            Writer.write_string(writer, 'project_domain_name', obj.project_domain_name)
6675        if obj.project_name is not None:
6676            Writer.write_string(writer, 'project_name', obj.project_name)
6677        if obj.properties is not None:
6678            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
6679        if obj.read_only is not None:
6680            Writer.write_boolean(writer, 'read_only', obj.read_only)
6681        if obj.requires_authentication is not None:
6682            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
6683        if obj.tenant_name is not None:
6684            Writer.write_string(writer, 'tenant_name', obj.tenant_name)
6685        if obj.type is not None:
6686            Writer.write_string(writer, 'type', obj.type.value)
6687        if obj.unmanaged is not None:
6688            Writer.write_boolean(writer, 'unmanaged', obj.unmanaged)
6689        if obj.url is not None:
6690            Writer.write_string(writer, 'url', obj.url)
6691        if obj.user_domain_name is not None:
6692            Writer.write_string(writer, 'user_domain_name', obj.user_domain_name)
6693        if obj.username is not None:
6694            Writer.write_string(writer, 'username', obj.username)
6695        if obj.certificates is not None:
6696            CertificateWriter.write_many(obj.certificates, writer, 'certificate', 'certificates')
6697        if obj.networks is not None:
6698            OpenStackNetworkWriter.write_many(obj.networks, writer, 'openstack_network', 'networks')
6699        if obj.subnets is not None:
6700            OpenStackSubnetWriter.write_many(obj.subnets, writer, 'openstack_subnet', 'subnets')
6701        writer.write_end()
6702
6703    @staticmethod
6704    def write_many(objs, writer, singular=None, plural=None):
6705        if singular is None:
6706            singular = 'openstack_network_provider'
6707        if plural is None:
6708            plural = 'openstack_network_providers'
6709        writer.write_start(plural)
6710        if type(objs) == List:
6711            href = objs.href
6712            if href is not None:
6713                writer.write_attribute('href', href)
6714        for obj in objs:
6715            OpenStackNetworkProviderWriter.write_one(obj, writer, singular)
6716        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

OpenStackNetworkProviderWriter()
6642    def __init__(self):
6643        super(OpenStackNetworkProviderWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6645    @staticmethod
6646    def write_one(obj, writer, singular=None):
6647        if singular is None:
6648            singular = 'openstack_network_provider'
6649        writer.write_start(singular)
6650        href = obj.href
6651        if href is not None:
6652            writer.write_attribute('href', href)
6653        if obj.id is not None:
6654            writer.write_attribute('id', obj.id)
6655        if obj.agent_configuration is not None:
6656            AgentConfigurationWriter.write_one(obj.agent_configuration, writer, 'agent_configuration')
6657        if obj.authentication_url is not None:
6658            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
6659        if obj.auto_sync is not None:
6660            Writer.write_boolean(writer, 'auto_sync', obj.auto_sync)
6661        if obj.comment is not None:
6662            Writer.write_string(writer, 'comment', obj.comment)
6663        if obj.description is not None:
6664            Writer.write_string(writer, 'description', obj.description)
6665        if obj.external_plugin_type is not None:
6666            Writer.write_string(writer, 'external_plugin_type', obj.external_plugin_type)
6667        if obj.name is not None:
6668            Writer.write_string(writer, 'name', obj.name)
6669        if obj.password is not None:
6670            Writer.write_string(writer, 'password', obj.password)
6671        if obj.plugin_type is not None:
6672            Writer.write_string(writer, 'plugin_type', obj.plugin_type.value)
6673        if obj.project_domain_name is not None:
6674            Writer.write_string(writer, 'project_domain_name', obj.project_domain_name)
6675        if obj.project_name is not None:
6676            Writer.write_string(writer, 'project_name', obj.project_name)
6677        if obj.properties is not None:
6678            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
6679        if obj.read_only is not None:
6680            Writer.write_boolean(writer, 'read_only', obj.read_only)
6681        if obj.requires_authentication is not None:
6682            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
6683        if obj.tenant_name is not None:
6684            Writer.write_string(writer, 'tenant_name', obj.tenant_name)
6685        if obj.type is not None:
6686            Writer.write_string(writer, 'type', obj.type.value)
6687        if obj.unmanaged is not None:
6688            Writer.write_boolean(writer, 'unmanaged', obj.unmanaged)
6689        if obj.url is not None:
6690            Writer.write_string(writer, 'url', obj.url)
6691        if obj.user_domain_name is not None:
6692            Writer.write_string(writer, 'user_domain_name', obj.user_domain_name)
6693        if obj.username is not None:
6694            Writer.write_string(writer, 'username', obj.username)
6695        if obj.certificates is not None:
6696            CertificateWriter.write_many(obj.certificates, writer, 'certificate', 'certificates')
6697        if obj.networks is not None:
6698            OpenStackNetworkWriter.write_many(obj.networks, writer, 'openstack_network', 'networks')
6699        if obj.subnets is not None:
6700            OpenStackSubnetWriter.write_many(obj.subnets, writer, 'openstack_subnet', 'subnets')
6701        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6703    @staticmethod
6704    def write_many(objs, writer, singular=None, plural=None):
6705        if singular is None:
6706            singular = 'openstack_network_provider'
6707        if plural is None:
6708            plural = 'openstack_network_providers'
6709        writer.write_start(plural)
6710        if type(objs) == List:
6711            href = objs.href
6712            if href is not None:
6713                writer.write_attribute('href', href)
6714        for obj in objs:
6715            OpenStackNetworkProviderWriter.write_one(obj, writer, singular)
6716        writer.write_end()
class OpenStackProviderWriter(ovirtsdk4.writer.Writer):
6719class OpenStackProviderWriter(Writer):
6720
6721    def __init__(self):
6722        super(OpenStackProviderWriter, self).__init__()
6723
6724    @staticmethod
6725    def write_one(obj, writer, singular=None):
6726        if singular is None:
6727            singular = 'open_stack_provider'
6728        writer.write_start(singular)
6729        href = obj.href
6730        if href is not None:
6731            writer.write_attribute('href', href)
6732        if obj.id is not None:
6733            writer.write_attribute('id', obj.id)
6734        if obj.authentication_url is not None:
6735            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
6736        if obj.comment is not None:
6737            Writer.write_string(writer, 'comment', obj.comment)
6738        if obj.description is not None:
6739            Writer.write_string(writer, 'description', obj.description)
6740        if obj.name is not None:
6741            Writer.write_string(writer, 'name', obj.name)
6742        if obj.password is not None:
6743            Writer.write_string(writer, 'password', obj.password)
6744        if obj.properties is not None:
6745            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
6746        if obj.requires_authentication is not None:
6747            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
6748        if obj.tenant_name is not None:
6749            Writer.write_string(writer, 'tenant_name', obj.tenant_name)
6750        if obj.url is not None:
6751            Writer.write_string(writer, 'url', obj.url)
6752        if obj.username is not None:
6753            Writer.write_string(writer, 'username', obj.username)
6754        writer.write_end()
6755
6756    @staticmethod
6757    def write_many(objs, writer, singular=None, plural=None):
6758        if singular is None:
6759            singular = 'open_stack_provider'
6760        if plural is None:
6761            plural = 'open_stack_providers'
6762        writer.write_start(plural)
6763        if type(objs) == List:
6764            href = objs.href
6765            if href is not None:
6766                writer.write_attribute('href', href)
6767        for obj in objs:
6768            OpenStackProviderWriter.write_one(obj, writer, singular)
6769        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

OpenStackProviderWriter()
6721    def __init__(self):
6722        super(OpenStackProviderWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6724    @staticmethod
6725    def write_one(obj, writer, singular=None):
6726        if singular is None:
6727            singular = 'open_stack_provider'
6728        writer.write_start(singular)
6729        href = obj.href
6730        if href is not None:
6731            writer.write_attribute('href', href)
6732        if obj.id is not None:
6733            writer.write_attribute('id', obj.id)
6734        if obj.authentication_url is not None:
6735            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
6736        if obj.comment is not None:
6737            Writer.write_string(writer, 'comment', obj.comment)
6738        if obj.description is not None:
6739            Writer.write_string(writer, 'description', obj.description)
6740        if obj.name is not None:
6741            Writer.write_string(writer, 'name', obj.name)
6742        if obj.password is not None:
6743            Writer.write_string(writer, 'password', obj.password)
6744        if obj.properties is not None:
6745            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
6746        if obj.requires_authentication is not None:
6747            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
6748        if obj.tenant_name is not None:
6749            Writer.write_string(writer, 'tenant_name', obj.tenant_name)
6750        if obj.url is not None:
6751            Writer.write_string(writer, 'url', obj.url)
6752        if obj.username is not None:
6753            Writer.write_string(writer, 'username', obj.username)
6754        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6756    @staticmethod
6757    def write_many(objs, writer, singular=None, plural=None):
6758        if singular is None:
6759            singular = 'open_stack_provider'
6760        if plural is None:
6761            plural = 'open_stack_providers'
6762        writer.write_start(plural)
6763        if type(objs) == List:
6764            href = objs.href
6765            if href is not None:
6766                writer.write_attribute('href', href)
6767        for obj in objs:
6768            OpenStackProviderWriter.write_one(obj, writer, singular)
6769        writer.write_end()
class OpenStackSubnetWriter(ovirtsdk4.writer.Writer):
6772class OpenStackSubnetWriter(Writer):
6773
6774    def __init__(self):
6775        super(OpenStackSubnetWriter, self).__init__()
6776
6777    @staticmethod
6778    def write_one(obj, writer, singular=None):
6779        if singular is None:
6780            singular = 'openstack_subnet'
6781        writer.write_start(singular)
6782        href = obj.href
6783        if href is not None:
6784            writer.write_attribute('href', href)
6785        if obj.id is not None:
6786            writer.write_attribute('id', obj.id)
6787        if obj.cidr is not None:
6788            Writer.write_string(writer, 'cidr', obj.cidr)
6789        if obj.comment is not None:
6790            Writer.write_string(writer, 'comment', obj.comment)
6791        if obj.description is not None:
6792            Writer.write_string(writer, 'description', obj.description)
6793        if obj.dns_servers is not None:
6794            writer.write_start('dns_servers')
6795            for item in obj.dns_servers:
6796                if item is not None:
6797                    Writer.write_string(writer, 'dns_server', item)
6798            writer.write_end()
6799        if obj.gateway is not None:
6800            Writer.write_string(writer, 'gateway', obj.gateway)
6801        if obj.ip_version is not None:
6802            Writer.write_string(writer, 'ip_version', obj.ip_version)
6803        if obj.name is not None:
6804            Writer.write_string(writer, 'name', obj.name)
6805        if obj.openstack_network is not None:
6806            OpenStackNetworkWriter.write_one(obj.openstack_network, writer, 'openstack_network')
6807        writer.write_end()
6808
6809    @staticmethod
6810    def write_many(objs, writer, singular=None, plural=None):
6811        if singular is None:
6812            singular = 'openstack_subnet'
6813        if plural is None:
6814            plural = 'openstack_subnets'
6815        writer.write_start(plural)
6816        if type(objs) == List:
6817            href = objs.href
6818            if href is not None:
6819                writer.write_attribute('href', href)
6820        for obj in objs:
6821            OpenStackSubnetWriter.write_one(obj, writer, singular)
6822        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

OpenStackSubnetWriter()
6774    def __init__(self):
6775        super(OpenStackSubnetWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6777    @staticmethod
6778    def write_one(obj, writer, singular=None):
6779        if singular is None:
6780            singular = 'openstack_subnet'
6781        writer.write_start(singular)
6782        href = obj.href
6783        if href is not None:
6784            writer.write_attribute('href', href)
6785        if obj.id is not None:
6786            writer.write_attribute('id', obj.id)
6787        if obj.cidr is not None:
6788            Writer.write_string(writer, 'cidr', obj.cidr)
6789        if obj.comment is not None:
6790            Writer.write_string(writer, 'comment', obj.comment)
6791        if obj.description is not None:
6792            Writer.write_string(writer, 'description', obj.description)
6793        if obj.dns_servers is not None:
6794            writer.write_start('dns_servers')
6795            for item in obj.dns_servers:
6796                if item is not None:
6797                    Writer.write_string(writer, 'dns_server', item)
6798            writer.write_end()
6799        if obj.gateway is not None:
6800            Writer.write_string(writer, 'gateway', obj.gateway)
6801        if obj.ip_version is not None:
6802            Writer.write_string(writer, 'ip_version', obj.ip_version)
6803        if obj.name is not None:
6804            Writer.write_string(writer, 'name', obj.name)
6805        if obj.openstack_network is not None:
6806            OpenStackNetworkWriter.write_one(obj.openstack_network, writer, 'openstack_network')
6807        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6809    @staticmethod
6810    def write_many(objs, writer, singular=None, plural=None):
6811        if singular is None:
6812            singular = 'openstack_subnet'
6813        if plural is None:
6814            plural = 'openstack_subnets'
6815        writer.write_start(plural)
6816        if type(objs) == List:
6817            href = objs.href
6818            if href is not None:
6819                writer.write_attribute('href', href)
6820        for obj in objs:
6821            OpenStackSubnetWriter.write_one(obj, writer, singular)
6822        writer.write_end()
class OpenStackVolumeProviderWriter(ovirtsdk4.writer.Writer):
6825class OpenStackVolumeProviderWriter(Writer):
6826
6827    def __init__(self):
6828        super(OpenStackVolumeProviderWriter, self).__init__()
6829
6830    @staticmethod
6831    def write_one(obj, writer, singular=None):
6832        if singular is None:
6833            singular = 'openstack_volume_provider'
6834        writer.write_start(singular)
6835        href = obj.href
6836        if href is not None:
6837            writer.write_attribute('href', href)
6838        if obj.id is not None:
6839            writer.write_attribute('id', obj.id)
6840        if obj.authentication_url is not None:
6841            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
6842        if obj.comment is not None:
6843            Writer.write_string(writer, 'comment', obj.comment)
6844        if obj.description is not None:
6845            Writer.write_string(writer, 'description', obj.description)
6846        if obj.name is not None:
6847            Writer.write_string(writer, 'name', obj.name)
6848        if obj.password is not None:
6849            Writer.write_string(writer, 'password', obj.password)
6850        if obj.properties is not None:
6851            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
6852        if obj.requires_authentication is not None:
6853            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
6854        if obj.tenant_name is not None:
6855            Writer.write_string(writer, 'tenant_name', obj.tenant_name)
6856        if obj.url is not None:
6857            Writer.write_string(writer, 'url', obj.url)
6858        if obj.username is not None:
6859            Writer.write_string(writer, 'username', obj.username)
6860        if obj.authentication_keys is not None:
6861            OpenstackVolumeAuthenticationKeyWriter.write_many(obj.authentication_keys, writer, 'openstack_volume_authentication_key', 'authentication_keys')
6862        if obj.certificates is not None:
6863            CertificateWriter.write_many(obj.certificates, writer, 'certificate', 'certificates')
6864        if obj.data_center is not None:
6865            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
6866        if obj.volume_types is not None:
6867            OpenStackVolumeTypeWriter.write_many(obj.volume_types, writer, 'open_stack_volume_type', 'volume_types')
6868        writer.write_end()
6869
6870    @staticmethod
6871    def write_many(objs, writer, singular=None, plural=None):
6872        if singular is None:
6873            singular = 'openstack_volume_provider'
6874        if plural is None:
6875            plural = 'openstack_volume_providers'
6876        writer.write_start(plural)
6877        if type(objs) == List:
6878            href = objs.href
6879            if href is not None:
6880                writer.write_attribute('href', href)
6881        for obj in objs:
6882            OpenStackVolumeProviderWriter.write_one(obj, writer, singular)
6883        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

OpenStackVolumeProviderWriter()
6827    def __init__(self):
6828        super(OpenStackVolumeProviderWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6830    @staticmethod
6831    def write_one(obj, writer, singular=None):
6832        if singular is None:
6833            singular = 'openstack_volume_provider'
6834        writer.write_start(singular)
6835        href = obj.href
6836        if href is not None:
6837            writer.write_attribute('href', href)
6838        if obj.id is not None:
6839            writer.write_attribute('id', obj.id)
6840        if obj.authentication_url is not None:
6841            Writer.write_string(writer, 'authentication_url', obj.authentication_url)
6842        if obj.comment is not None:
6843            Writer.write_string(writer, 'comment', obj.comment)
6844        if obj.description is not None:
6845            Writer.write_string(writer, 'description', obj.description)
6846        if obj.name is not None:
6847            Writer.write_string(writer, 'name', obj.name)
6848        if obj.password is not None:
6849            Writer.write_string(writer, 'password', obj.password)
6850        if obj.properties is not None:
6851            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
6852        if obj.requires_authentication is not None:
6853            Writer.write_boolean(writer, 'requires_authentication', obj.requires_authentication)
6854        if obj.tenant_name is not None:
6855            Writer.write_string(writer, 'tenant_name', obj.tenant_name)
6856        if obj.url is not None:
6857            Writer.write_string(writer, 'url', obj.url)
6858        if obj.username is not None:
6859            Writer.write_string(writer, 'username', obj.username)
6860        if obj.authentication_keys is not None:
6861            OpenstackVolumeAuthenticationKeyWriter.write_many(obj.authentication_keys, writer, 'openstack_volume_authentication_key', 'authentication_keys')
6862        if obj.certificates is not None:
6863            CertificateWriter.write_many(obj.certificates, writer, 'certificate', 'certificates')
6864        if obj.data_center is not None:
6865            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
6866        if obj.volume_types is not None:
6867            OpenStackVolumeTypeWriter.write_many(obj.volume_types, writer, 'open_stack_volume_type', 'volume_types')
6868        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6870    @staticmethod
6871    def write_many(objs, writer, singular=None, plural=None):
6872        if singular is None:
6873            singular = 'openstack_volume_provider'
6874        if plural is None:
6875            plural = 'openstack_volume_providers'
6876        writer.write_start(plural)
6877        if type(objs) == List:
6878            href = objs.href
6879            if href is not None:
6880                writer.write_attribute('href', href)
6881        for obj in objs:
6882            OpenStackVolumeProviderWriter.write_one(obj, writer, singular)
6883        writer.write_end()
class OpenStackVolumeTypeWriter(ovirtsdk4.writer.Writer):
6886class OpenStackVolumeTypeWriter(Writer):
6887
6888    def __init__(self):
6889        super(OpenStackVolumeTypeWriter, self).__init__()
6890
6891    @staticmethod
6892    def write_one(obj, writer, singular=None):
6893        if singular is None:
6894            singular = 'open_stack_volume_type'
6895        writer.write_start(singular)
6896        href = obj.href
6897        if href is not None:
6898            writer.write_attribute('href', href)
6899        if obj.id is not None:
6900            writer.write_attribute('id', obj.id)
6901        if obj.comment is not None:
6902            Writer.write_string(writer, 'comment', obj.comment)
6903        if obj.description is not None:
6904            Writer.write_string(writer, 'description', obj.description)
6905        if obj.name is not None:
6906            Writer.write_string(writer, 'name', obj.name)
6907        if obj.properties is not None:
6908            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
6909        if obj.openstack_volume_provider is not None:
6910            OpenStackVolumeProviderWriter.write_one(obj.openstack_volume_provider, writer, 'openstack_volume_provider')
6911        writer.write_end()
6912
6913    @staticmethod
6914    def write_many(objs, writer, singular=None, plural=None):
6915        if singular is None:
6916            singular = 'open_stack_volume_type'
6917        if plural is None:
6918            plural = 'open_stack_volume_types'
6919        writer.write_start(plural)
6920        if type(objs) == List:
6921            href = objs.href
6922            if href is not None:
6923                writer.write_attribute('href', href)
6924        for obj in objs:
6925            OpenStackVolumeTypeWriter.write_one(obj, writer, singular)
6926        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

OpenStackVolumeTypeWriter()
6888    def __init__(self):
6889        super(OpenStackVolumeTypeWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6891    @staticmethod
6892    def write_one(obj, writer, singular=None):
6893        if singular is None:
6894            singular = 'open_stack_volume_type'
6895        writer.write_start(singular)
6896        href = obj.href
6897        if href is not None:
6898            writer.write_attribute('href', href)
6899        if obj.id is not None:
6900            writer.write_attribute('id', obj.id)
6901        if obj.comment is not None:
6902            Writer.write_string(writer, 'comment', obj.comment)
6903        if obj.description is not None:
6904            Writer.write_string(writer, 'description', obj.description)
6905        if obj.name is not None:
6906            Writer.write_string(writer, 'name', obj.name)
6907        if obj.properties is not None:
6908            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
6909        if obj.openstack_volume_provider is not None:
6910            OpenStackVolumeProviderWriter.write_one(obj.openstack_volume_provider, writer, 'openstack_volume_provider')
6911        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6913    @staticmethod
6914    def write_many(objs, writer, singular=None, plural=None):
6915        if singular is None:
6916            singular = 'open_stack_volume_type'
6917        if plural is None:
6918            plural = 'open_stack_volume_types'
6919        writer.write_start(plural)
6920        if type(objs) == List:
6921            href = objs.href
6922            if href is not None:
6923                writer.write_attribute('href', href)
6924        for obj in objs:
6925            OpenStackVolumeTypeWriter.write_one(obj, writer, singular)
6926        writer.write_end()
class OpenstackVolumeAuthenticationKeyWriter(ovirtsdk4.writer.Writer):
6929class OpenstackVolumeAuthenticationKeyWriter(Writer):
6930
6931    def __init__(self):
6932        super(OpenstackVolumeAuthenticationKeyWriter, self).__init__()
6933
6934    @staticmethod
6935    def write_one(obj, writer, singular=None):
6936        if singular is None:
6937            singular = 'openstack_volume_authentication_key'
6938        writer.write_start(singular)
6939        href = obj.href
6940        if href is not None:
6941            writer.write_attribute('href', href)
6942        if obj.id is not None:
6943            writer.write_attribute('id', obj.id)
6944        if obj.comment is not None:
6945            Writer.write_string(writer, 'comment', obj.comment)
6946        if obj.creation_date is not None:
6947            Writer.write_date(writer, 'creation_date', obj.creation_date)
6948        if obj.description is not None:
6949            Writer.write_string(writer, 'description', obj.description)
6950        if obj.name is not None:
6951            Writer.write_string(writer, 'name', obj.name)
6952        if obj.usage_type is not None:
6953            Writer.write_string(writer, 'usage_type', obj.usage_type.value)
6954        if obj.uuid is not None:
6955            Writer.write_string(writer, 'uuid', obj.uuid)
6956        if obj.value is not None:
6957            Writer.write_string(writer, 'value', obj.value)
6958        if obj.openstack_volume_provider is not None:
6959            OpenStackVolumeProviderWriter.write_one(obj.openstack_volume_provider, writer, 'openstack_volume_provider')
6960        writer.write_end()
6961
6962    @staticmethod
6963    def write_many(objs, writer, singular=None, plural=None):
6964        if singular is None:
6965            singular = 'openstack_volume_authentication_key'
6966        if plural is None:
6967            plural = 'openstack_volume_authentication_keys'
6968        writer.write_start(plural)
6969        if type(objs) == List:
6970            href = objs.href
6971            if href is not None:
6972                writer.write_attribute('href', href)
6973        for obj in objs:
6974            OpenstackVolumeAuthenticationKeyWriter.write_one(obj, writer, singular)
6975        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

OpenstackVolumeAuthenticationKeyWriter()
6931    def __init__(self):
6932        super(OpenstackVolumeAuthenticationKeyWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6934    @staticmethod
6935    def write_one(obj, writer, singular=None):
6936        if singular is None:
6937            singular = 'openstack_volume_authentication_key'
6938        writer.write_start(singular)
6939        href = obj.href
6940        if href is not None:
6941            writer.write_attribute('href', href)
6942        if obj.id is not None:
6943            writer.write_attribute('id', obj.id)
6944        if obj.comment is not None:
6945            Writer.write_string(writer, 'comment', obj.comment)
6946        if obj.creation_date is not None:
6947            Writer.write_date(writer, 'creation_date', obj.creation_date)
6948        if obj.description is not None:
6949            Writer.write_string(writer, 'description', obj.description)
6950        if obj.name is not None:
6951            Writer.write_string(writer, 'name', obj.name)
6952        if obj.usage_type is not None:
6953            Writer.write_string(writer, 'usage_type', obj.usage_type.value)
6954        if obj.uuid is not None:
6955            Writer.write_string(writer, 'uuid', obj.uuid)
6956        if obj.value is not None:
6957            Writer.write_string(writer, 'value', obj.value)
6958        if obj.openstack_volume_provider is not None:
6959            OpenStackVolumeProviderWriter.write_one(obj.openstack_volume_provider, writer, 'openstack_volume_provider')
6960        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
6962    @staticmethod
6963    def write_many(objs, writer, singular=None, plural=None):
6964        if singular is None:
6965            singular = 'openstack_volume_authentication_key'
6966        if plural is None:
6967            plural = 'openstack_volume_authentication_keys'
6968        writer.write_start(plural)
6969        if type(objs) == List:
6970            href = objs.href
6971            if href is not None:
6972                writer.write_attribute('href', href)
6973        for obj in objs:
6974            OpenstackVolumeAuthenticationKeyWriter.write_one(obj, writer, singular)
6975        writer.write_end()
class OperatingSystemWriter(ovirtsdk4.writer.Writer):
6978class OperatingSystemWriter(Writer):
6979
6980    def __init__(self):
6981        super(OperatingSystemWriter, self).__init__()
6982
6983    @staticmethod
6984    def write_one(obj, writer, singular=None):
6985        if singular is None:
6986            singular = 'os'
6987        writer.write_start(singular)
6988        href = obj.href
6989        if href is not None:
6990            writer.write_attribute('href', href)
6991        if obj.boot is not None:
6992            BootWriter.write_one(obj.boot, writer, 'boot')
6993        if obj.cmdline is not None:
6994            Writer.write_string(writer, 'cmdline', obj.cmdline)
6995        if obj.custom_kernel_cmdline is not None:
6996            Writer.write_string(writer, 'custom_kernel_cmdline', obj.custom_kernel_cmdline)
6997        if obj.initrd is not None:
6998            Writer.write_string(writer, 'initrd', obj.initrd)
6999        if obj.kernel is not None:
7000            Writer.write_string(writer, 'kernel', obj.kernel)
7001        if obj.reported_kernel_cmdline is not None:
7002            Writer.write_string(writer, 'reported_kernel_cmdline', obj.reported_kernel_cmdline)
7003        if obj.type is not None:
7004            Writer.write_string(writer, 'type', obj.type)
7005        if obj.version is not None:
7006            VersionWriter.write_one(obj.version, writer, 'version')
7007        writer.write_end()
7008
7009    @staticmethod
7010    def write_many(objs, writer, singular=None, plural=None):
7011        if singular is None:
7012            singular = 'os'
7013        if plural is None:
7014            plural = 'oss'
7015        writer.write_start(plural)
7016        if type(objs) == List:
7017            href = objs.href
7018            if href is not None:
7019                writer.write_attribute('href', href)
7020        for obj in objs:
7021            OperatingSystemWriter.write_one(obj, writer, singular)
7022        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

OperatingSystemWriter()
6980    def __init__(self):
6981        super(OperatingSystemWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
6983    @staticmethod
6984    def write_one(obj, writer, singular=None):
6985        if singular is None:
6986            singular = 'os'
6987        writer.write_start(singular)
6988        href = obj.href
6989        if href is not None:
6990            writer.write_attribute('href', href)
6991        if obj.boot is not None:
6992            BootWriter.write_one(obj.boot, writer, 'boot')
6993        if obj.cmdline is not None:
6994            Writer.write_string(writer, 'cmdline', obj.cmdline)
6995        if obj.custom_kernel_cmdline is not None:
6996            Writer.write_string(writer, 'custom_kernel_cmdline', obj.custom_kernel_cmdline)
6997        if obj.initrd is not None:
6998            Writer.write_string(writer, 'initrd', obj.initrd)
6999        if obj.kernel is not None:
7000            Writer.write_string(writer, 'kernel', obj.kernel)
7001        if obj.reported_kernel_cmdline is not None:
7002            Writer.write_string(writer, 'reported_kernel_cmdline', obj.reported_kernel_cmdline)
7003        if obj.type is not None:
7004            Writer.write_string(writer, 'type', obj.type)
7005        if obj.version is not None:
7006            VersionWriter.write_one(obj.version, writer, 'version')
7007        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7009    @staticmethod
7010    def write_many(objs, writer, singular=None, plural=None):
7011        if singular is None:
7012            singular = 'os'
7013        if plural is None:
7014            plural = 'oss'
7015        writer.write_start(plural)
7016        if type(objs) == List:
7017            href = objs.href
7018            if href is not None:
7019                writer.write_attribute('href', href)
7020        for obj in objs:
7021            OperatingSystemWriter.write_one(obj, writer, singular)
7022        writer.write_end()
class OperatingSystemInfoWriter(ovirtsdk4.writer.Writer):
7025class OperatingSystemInfoWriter(Writer):
7026
7027    def __init__(self):
7028        super(OperatingSystemInfoWriter, self).__init__()
7029
7030    @staticmethod
7031    def write_one(obj, writer, singular=None):
7032        if singular is None:
7033            singular = 'operating_system'
7034        writer.write_start(singular)
7035        href = obj.href
7036        if href is not None:
7037            writer.write_attribute('href', href)
7038        if obj.id is not None:
7039            writer.write_attribute('id', obj.id)
7040        if obj.architecture is not None:
7041            Writer.write_string(writer, 'architecture', obj.architecture.value)
7042        if obj.comment is not None:
7043            Writer.write_string(writer, 'comment', obj.comment)
7044        if obj.description is not None:
7045            Writer.write_string(writer, 'description', obj.description)
7046        if obj.large_icon is not None:
7047            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
7048        if obj.name is not None:
7049            Writer.write_string(writer, 'name', obj.name)
7050        if obj.small_icon is not None:
7051            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
7052        if obj.tpm_support is not None:
7053            Writer.write_string(writer, 'tpm_support', obj.tpm_support.value)
7054        writer.write_end()
7055
7056    @staticmethod
7057    def write_many(objs, writer, singular=None, plural=None):
7058        if singular is None:
7059            singular = 'operating_system'
7060        if plural is None:
7061            plural = 'operation_systems'
7062        writer.write_start(plural)
7063        if type(objs) == List:
7064            href = objs.href
7065            if href is not None:
7066                writer.write_attribute('href', href)
7067        for obj in objs:
7068            OperatingSystemInfoWriter.write_one(obj, writer, singular)
7069        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

OperatingSystemInfoWriter()
7027    def __init__(self):
7028        super(OperatingSystemInfoWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7030    @staticmethod
7031    def write_one(obj, writer, singular=None):
7032        if singular is None:
7033            singular = 'operating_system'
7034        writer.write_start(singular)
7035        href = obj.href
7036        if href is not None:
7037            writer.write_attribute('href', href)
7038        if obj.id is not None:
7039            writer.write_attribute('id', obj.id)
7040        if obj.architecture is not None:
7041            Writer.write_string(writer, 'architecture', obj.architecture.value)
7042        if obj.comment is not None:
7043            Writer.write_string(writer, 'comment', obj.comment)
7044        if obj.description is not None:
7045            Writer.write_string(writer, 'description', obj.description)
7046        if obj.large_icon is not None:
7047            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
7048        if obj.name is not None:
7049            Writer.write_string(writer, 'name', obj.name)
7050        if obj.small_icon is not None:
7051            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
7052        if obj.tpm_support is not None:
7053            Writer.write_string(writer, 'tpm_support', obj.tpm_support.value)
7054        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7056    @staticmethod
7057    def write_many(objs, writer, singular=None, plural=None):
7058        if singular is None:
7059            singular = 'operating_system'
7060        if plural is None:
7061            plural = 'operation_systems'
7062        writer.write_start(plural)
7063        if type(objs) == List:
7064            href = objs.href
7065            if href is not None:
7066                writer.write_attribute('href', href)
7067        for obj in objs:
7068            OperatingSystemInfoWriter.write_one(obj, writer, singular)
7069        writer.write_end()
class OptionWriter(ovirtsdk4.writer.Writer):
7072class OptionWriter(Writer):
7073
7074    def __init__(self):
7075        super(OptionWriter, self).__init__()
7076
7077    @staticmethod
7078    def write_one(obj, writer, singular=None):
7079        if singular is None:
7080            singular = 'option'
7081        writer.write_start(singular)
7082        href = obj.href
7083        if href is not None:
7084            writer.write_attribute('href', href)
7085        if obj.name is not None:
7086            Writer.write_string(writer, 'name', obj.name)
7087        if obj.type is not None:
7088            Writer.write_string(writer, 'type', obj.type)
7089        if obj.value is not None:
7090            Writer.write_string(writer, 'value', obj.value)
7091        writer.write_end()
7092
7093    @staticmethod
7094    def write_many(objs, writer, singular=None, plural=None):
7095        if singular is None:
7096            singular = 'option'
7097        if plural is None:
7098            plural = 'options'
7099        writer.write_start(plural)
7100        if type(objs) == List:
7101            href = objs.href
7102            if href is not None:
7103                writer.write_attribute('href', href)
7104        for obj in objs:
7105            OptionWriter.write_one(obj, writer, singular)
7106        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

OptionWriter()
7074    def __init__(self):
7075        super(OptionWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7077    @staticmethod
7078    def write_one(obj, writer, singular=None):
7079        if singular is None:
7080            singular = 'option'
7081        writer.write_start(singular)
7082        href = obj.href
7083        if href is not None:
7084            writer.write_attribute('href', href)
7085        if obj.name is not None:
7086            Writer.write_string(writer, 'name', obj.name)
7087        if obj.type is not None:
7088            Writer.write_string(writer, 'type', obj.type)
7089        if obj.value is not None:
7090            Writer.write_string(writer, 'value', obj.value)
7091        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7093    @staticmethod
7094    def write_many(objs, writer, singular=None, plural=None):
7095        if singular is None:
7096            singular = 'option'
7097        if plural is None:
7098            plural = 'options'
7099        writer.write_start(plural)
7100        if type(objs) == List:
7101            href = objs.href
7102            if href is not None:
7103                writer.write_attribute('href', href)
7104        for obj in objs:
7105            OptionWriter.write_one(obj, writer, singular)
7106        writer.write_end()
class PackageWriter(ovirtsdk4.writer.Writer):
7109class PackageWriter(Writer):
7110
7111    def __init__(self):
7112        super(PackageWriter, self).__init__()
7113
7114    @staticmethod
7115    def write_one(obj, writer, singular=None):
7116        if singular is None:
7117            singular = 'package'
7118        writer.write_start(singular)
7119        href = obj.href
7120        if href is not None:
7121            writer.write_attribute('href', href)
7122        if obj.name is not None:
7123            Writer.write_string(writer, 'name', obj.name)
7124        writer.write_end()
7125
7126    @staticmethod
7127    def write_many(objs, writer, singular=None, plural=None):
7128        if singular is None:
7129            singular = 'package'
7130        if plural is None:
7131            plural = 'packages'
7132        writer.write_start(plural)
7133        if type(objs) == List:
7134            href = objs.href
7135            if href is not None:
7136                writer.write_attribute('href', href)
7137        for obj in objs:
7138            PackageWriter.write_one(obj, writer, singular)
7139        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

PackageWriter()
7111    def __init__(self):
7112        super(PackageWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7114    @staticmethod
7115    def write_one(obj, writer, singular=None):
7116        if singular is None:
7117            singular = 'package'
7118        writer.write_start(singular)
7119        href = obj.href
7120        if href is not None:
7121            writer.write_attribute('href', href)
7122        if obj.name is not None:
7123            Writer.write_string(writer, 'name', obj.name)
7124        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7126    @staticmethod
7127    def write_many(objs, writer, singular=None, plural=None):
7128        if singular is None:
7129            singular = 'package'
7130        if plural is None:
7131            plural = 'packages'
7132        writer.write_start(plural)
7133        if type(objs) == List:
7134            href = objs.href
7135            if href is not None:
7136                writer.write_attribute('href', href)
7137        for obj in objs:
7138            PackageWriter.write_one(obj, writer, singular)
7139        writer.write_end()
class PayloadWriter(ovirtsdk4.writer.Writer):
7142class PayloadWriter(Writer):
7143
7144    def __init__(self):
7145        super(PayloadWriter, self).__init__()
7146
7147    @staticmethod
7148    def write_one(obj, writer, singular=None):
7149        if singular is None:
7150            singular = 'payload'
7151        writer.write_start(singular)
7152        href = obj.href
7153        if href is not None:
7154            writer.write_attribute('href', href)
7155        if obj.files is not None:
7156            FileWriter.write_many(obj.files, writer, 'file', 'files')
7157        if obj.type is not None:
7158            Writer.write_string(writer, 'type', obj.type.value)
7159        if obj.volume_id is not None:
7160            Writer.write_string(writer, 'volume_id', obj.volume_id)
7161        writer.write_end()
7162
7163    @staticmethod
7164    def write_many(objs, writer, singular=None, plural=None):
7165        if singular is None:
7166            singular = 'payload'
7167        if plural is None:
7168            plural = 'payloads'
7169        writer.write_start(plural)
7170        if type(objs) == List:
7171            href = objs.href
7172            if href is not None:
7173                writer.write_attribute('href', href)
7174        for obj in objs:
7175            PayloadWriter.write_one(obj, writer, singular)
7176        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

PayloadWriter()
7144    def __init__(self):
7145        super(PayloadWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7147    @staticmethod
7148    def write_one(obj, writer, singular=None):
7149        if singular is None:
7150            singular = 'payload'
7151        writer.write_start(singular)
7152        href = obj.href
7153        if href is not None:
7154            writer.write_attribute('href', href)
7155        if obj.files is not None:
7156            FileWriter.write_many(obj.files, writer, 'file', 'files')
7157        if obj.type is not None:
7158            Writer.write_string(writer, 'type', obj.type.value)
7159        if obj.volume_id is not None:
7160            Writer.write_string(writer, 'volume_id', obj.volume_id)
7161        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7163    @staticmethod
7164    def write_many(objs, writer, singular=None, plural=None):
7165        if singular is None:
7166            singular = 'payload'
7167        if plural is None:
7168            plural = 'payloads'
7169        writer.write_start(plural)
7170        if type(objs) == List:
7171            href = objs.href
7172            if href is not None:
7173                writer.write_attribute('href', href)
7174        for obj in objs:
7175            PayloadWriter.write_one(obj, writer, singular)
7176        writer.write_end()
class PermissionWriter(ovirtsdk4.writer.Writer):
7179class PermissionWriter(Writer):
7180
7181    def __init__(self):
7182        super(PermissionWriter, self).__init__()
7183
7184    @staticmethod
7185    def write_one(obj, writer, singular=None):
7186        if singular is None:
7187            singular = 'permission'
7188        writer.write_start(singular)
7189        href = obj.href
7190        if href is not None:
7191            writer.write_attribute('href', href)
7192        if obj.id is not None:
7193            writer.write_attribute('id', obj.id)
7194        if obj.comment is not None:
7195            Writer.write_string(writer, 'comment', obj.comment)
7196        if obj.description is not None:
7197            Writer.write_string(writer, 'description', obj.description)
7198        if obj.name is not None:
7199            Writer.write_string(writer, 'name', obj.name)
7200        if obj.cluster is not None:
7201            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
7202        if obj.data_center is not None:
7203            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
7204        if obj.disk is not None:
7205            DiskWriter.write_one(obj.disk, writer, 'disk')
7206        if obj.group is not None:
7207            GroupWriter.write_one(obj.group, writer, 'group')
7208        if obj.host is not None:
7209            HostWriter.write_one(obj.host, writer, 'host')
7210        if obj.role is not None:
7211            RoleWriter.write_one(obj.role, writer, 'role')
7212        if obj.storage_domain is not None:
7213            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
7214        if obj.template is not None:
7215            TemplateWriter.write_one(obj.template, writer, 'template')
7216        if obj.user is not None:
7217            UserWriter.write_one(obj.user, writer, 'user')
7218        if obj.vm is not None:
7219            VmWriter.write_one(obj.vm, writer, 'vm')
7220        if obj.vm_pool is not None:
7221            VmPoolWriter.write_one(obj.vm_pool, writer, 'vm_pool')
7222        writer.write_end()
7223
7224    @staticmethod
7225    def write_many(objs, writer, singular=None, plural=None):
7226        if singular is None:
7227            singular = 'permission'
7228        if plural is None:
7229            plural = 'permissions'
7230        writer.write_start(plural)
7231        if type(objs) == List:
7232            href = objs.href
7233            if href is not None:
7234                writer.write_attribute('href', href)
7235        for obj in objs:
7236            PermissionWriter.write_one(obj, writer, singular)
7237        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

PermissionWriter()
7181    def __init__(self):
7182        super(PermissionWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7184    @staticmethod
7185    def write_one(obj, writer, singular=None):
7186        if singular is None:
7187            singular = 'permission'
7188        writer.write_start(singular)
7189        href = obj.href
7190        if href is not None:
7191            writer.write_attribute('href', href)
7192        if obj.id is not None:
7193            writer.write_attribute('id', obj.id)
7194        if obj.comment is not None:
7195            Writer.write_string(writer, 'comment', obj.comment)
7196        if obj.description is not None:
7197            Writer.write_string(writer, 'description', obj.description)
7198        if obj.name is not None:
7199            Writer.write_string(writer, 'name', obj.name)
7200        if obj.cluster is not None:
7201            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
7202        if obj.data_center is not None:
7203            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
7204        if obj.disk is not None:
7205            DiskWriter.write_one(obj.disk, writer, 'disk')
7206        if obj.group is not None:
7207            GroupWriter.write_one(obj.group, writer, 'group')
7208        if obj.host is not None:
7209            HostWriter.write_one(obj.host, writer, 'host')
7210        if obj.role is not None:
7211            RoleWriter.write_one(obj.role, writer, 'role')
7212        if obj.storage_domain is not None:
7213            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
7214        if obj.template is not None:
7215            TemplateWriter.write_one(obj.template, writer, 'template')
7216        if obj.user is not None:
7217            UserWriter.write_one(obj.user, writer, 'user')
7218        if obj.vm is not None:
7219            VmWriter.write_one(obj.vm, writer, 'vm')
7220        if obj.vm_pool is not None:
7221            VmPoolWriter.write_one(obj.vm_pool, writer, 'vm_pool')
7222        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7224    @staticmethod
7225    def write_many(objs, writer, singular=None, plural=None):
7226        if singular is None:
7227            singular = 'permission'
7228        if plural is None:
7229            plural = 'permissions'
7230        writer.write_start(plural)
7231        if type(objs) == List:
7232            href = objs.href
7233            if href is not None:
7234                writer.write_attribute('href', href)
7235        for obj in objs:
7236            PermissionWriter.write_one(obj, writer, singular)
7237        writer.write_end()
class PermitWriter(ovirtsdk4.writer.Writer):
7240class PermitWriter(Writer):
7241
7242    def __init__(self):
7243        super(PermitWriter, self).__init__()
7244
7245    @staticmethod
7246    def write_one(obj, writer, singular=None):
7247        if singular is None:
7248            singular = 'permit'
7249        writer.write_start(singular)
7250        href = obj.href
7251        if href is not None:
7252            writer.write_attribute('href', href)
7253        if obj.id is not None:
7254            writer.write_attribute('id', obj.id)
7255        if obj.administrative is not None:
7256            Writer.write_boolean(writer, 'administrative', obj.administrative)
7257        if obj.comment is not None:
7258            Writer.write_string(writer, 'comment', obj.comment)
7259        if obj.description is not None:
7260            Writer.write_string(writer, 'description', obj.description)
7261        if obj.name is not None:
7262            Writer.write_string(writer, 'name', obj.name)
7263        if obj.role is not None:
7264            RoleWriter.write_one(obj.role, writer, 'role')
7265        writer.write_end()
7266
7267    @staticmethod
7268    def write_many(objs, writer, singular=None, plural=None):
7269        if singular is None:
7270            singular = 'permit'
7271        if plural is None:
7272            plural = 'permits'
7273        writer.write_start(plural)
7274        if type(objs) == List:
7275            href = objs.href
7276            if href is not None:
7277                writer.write_attribute('href', href)
7278        for obj in objs:
7279            PermitWriter.write_one(obj, writer, singular)
7280        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

PermitWriter()
7242    def __init__(self):
7243        super(PermitWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7245    @staticmethod
7246    def write_one(obj, writer, singular=None):
7247        if singular is None:
7248            singular = 'permit'
7249        writer.write_start(singular)
7250        href = obj.href
7251        if href is not None:
7252            writer.write_attribute('href', href)
7253        if obj.id is not None:
7254            writer.write_attribute('id', obj.id)
7255        if obj.administrative is not None:
7256            Writer.write_boolean(writer, 'administrative', obj.administrative)
7257        if obj.comment is not None:
7258            Writer.write_string(writer, 'comment', obj.comment)
7259        if obj.description is not None:
7260            Writer.write_string(writer, 'description', obj.description)
7261        if obj.name is not None:
7262            Writer.write_string(writer, 'name', obj.name)
7263        if obj.role is not None:
7264            RoleWriter.write_one(obj.role, writer, 'role')
7265        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7267    @staticmethod
7268    def write_many(objs, writer, singular=None, plural=None):
7269        if singular is None:
7270            singular = 'permit'
7271        if plural is None:
7272            plural = 'permits'
7273        writer.write_start(plural)
7274        if type(objs) == List:
7275            href = objs.href
7276            if href is not None:
7277                writer.write_attribute('href', href)
7278        for obj in objs:
7279            PermitWriter.write_one(obj, writer, singular)
7280        writer.write_end()
class PmProxyWriter(ovirtsdk4.writer.Writer):
7283class PmProxyWriter(Writer):
7284
7285    def __init__(self):
7286        super(PmProxyWriter, self).__init__()
7287
7288    @staticmethod
7289    def write_one(obj, writer, singular=None):
7290        if singular is None:
7291            singular = 'pm_proxy'
7292        writer.write_start(singular)
7293        href = obj.href
7294        if href is not None:
7295            writer.write_attribute('href', href)
7296        if obj.type is not None:
7297            Writer.write_string(writer, 'type', obj.type.value)
7298        writer.write_end()
7299
7300    @staticmethod
7301    def write_many(objs, writer, singular=None, plural=None):
7302        if singular is None:
7303            singular = 'pm_proxy'
7304        if plural is None:
7305            plural = 'pm_proxies'
7306        writer.write_start(plural)
7307        if type(objs) == List:
7308            href = objs.href
7309            if href is not None:
7310                writer.write_attribute('href', href)
7311        for obj in objs:
7312            PmProxyWriter.write_one(obj, writer, singular)
7313        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

PmProxyWriter()
7285    def __init__(self):
7286        super(PmProxyWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7288    @staticmethod
7289    def write_one(obj, writer, singular=None):
7290        if singular is None:
7291            singular = 'pm_proxy'
7292        writer.write_start(singular)
7293        href = obj.href
7294        if href is not None:
7295            writer.write_attribute('href', href)
7296        if obj.type is not None:
7297            Writer.write_string(writer, 'type', obj.type.value)
7298        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7300    @staticmethod
7301    def write_many(objs, writer, singular=None, plural=None):
7302        if singular is None:
7303            singular = 'pm_proxy'
7304        if plural is None:
7305            plural = 'pm_proxies'
7306        writer.write_start(plural)
7307        if type(objs) == List:
7308            href = objs.href
7309            if href is not None:
7310                writer.write_attribute('href', href)
7311        for obj in objs:
7312            PmProxyWriter.write_one(obj, writer, singular)
7313        writer.write_end()
class PortMirroringWriter(ovirtsdk4.writer.Writer):
7316class PortMirroringWriter(Writer):
7317
7318    def __init__(self):
7319        super(PortMirroringWriter, self).__init__()
7320
7321    @staticmethod
7322    def write_one(obj, writer, singular=None):
7323        if singular is None:
7324            singular = 'port_mirroring'
7325        writer.write_start(singular)
7326        href = obj.href
7327        if href is not None:
7328            writer.write_attribute('href', href)
7329        writer.write_end()
7330
7331    @staticmethod
7332    def write_many(objs, writer, singular=None, plural=None):
7333        if singular is None:
7334            singular = 'port_mirroring'
7335        if plural is None:
7336            plural = 'port_mirrorings'
7337        writer.write_start(plural)
7338        if type(objs) == List:
7339            href = objs.href
7340            if href is not None:
7341                writer.write_attribute('href', href)
7342        for obj in objs:
7343            PortMirroringWriter.write_one(obj, writer, singular)
7344        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

PortMirroringWriter()
7318    def __init__(self):
7319        super(PortMirroringWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7321    @staticmethod
7322    def write_one(obj, writer, singular=None):
7323        if singular is None:
7324            singular = 'port_mirroring'
7325        writer.write_start(singular)
7326        href = obj.href
7327        if href is not None:
7328            writer.write_attribute('href', href)
7329        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7331    @staticmethod
7332    def write_many(objs, writer, singular=None, plural=None):
7333        if singular is None:
7334            singular = 'port_mirroring'
7335        if plural is None:
7336            plural = 'port_mirrorings'
7337        writer.write_start(plural)
7338        if type(objs) == List:
7339            href = objs.href
7340            if href is not None:
7341                writer.write_attribute('href', href)
7342        for obj in objs:
7343            PortMirroringWriter.write_one(obj, writer, singular)
7344        writer.write_end()
class PowerManagementWriter(ovirtsdk4.writer.Writer):
7347class PowerManagementWriter(Writer):
7348
7349    def __init__(self):
7350        super(PowerManagementWriter, self).__init__()
7351
7352    @staticmethod
7353    def write_one(obj, writer, singular=None):
7354        if singular is None:
7355            singular = 'power_management'
7356        writer.write_start(singular)
7357        href = obj.href
7358        if href is not None:
7359            writer.write_attribute('href', href)
7360        if obj.address is not None:
7361            Writer.write_string(writer, 'address', obj.address)
7362        if obj.agents is not None:
7363            AgentWriter.write_many(obj.agents, writer, 'agent', 'agents')
7364        if obj.automatic_pm_enabled is not None:
7365            Writer.write_boolean(writer, 'automatic_pm_enabled', obj.automatic_pm_enabled)
7366        if obj.enabled is not None:
7367            Writer.write_boolean(writer, 'enabled', obj.enabled)
7368        if obj.kdump_detection is not None:
7369            Writer.write_boolean(writer, 'kdump_detection', obj.kdump_detection)
7370        if obj.options is not None:
7371            OptionWriter.write_many(obj.options, writer, 'option', 'options')
7372        if obj.password is not None:
7373            Writer.write_string(writer, 'password', obj.password)
7374        if obj.pm_proxies is not None:
7375            PmProxyWriter.write_many(obj.pm_proxies, writer, 'pm_proxy', 'pm_proxies')
7376        if obj.status is not None:
7377            Writer.write_string(writer, 'status', obj.status.value)
7378        if obj.type is not None:
7379            Writer.write_string(writer, 'type', obj.type)
7380        if obj.username is not None:
7381            Writer.write_string(writer, 'username', obj.username)
7382        writer.write_end()
7383
7384    @staticmethod
7385    def write_many(objs, writer, singular=None, plural=None):
7386        if singular is None:
7387            singular = 'power_management'
7388        if plural is None:
7389            plural = 'power_managements'
7390        writer.write_start(plural)
7391        if type(objs) == List:
7392            href = objs.href
7393            if href is not None:
7394                writer.write_attribute('href', href)
7395        for obj in objs:
7396            PowerManagementWriter.write_one(obj, writer, singular)
7397        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

PowerManagementWriter()
7349    def __init__(self):
7350        super(PowerManagementWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7352    @staticmethod
7353    def write_one(obj, writer, singular=None):
7354        if singular is None:
7355            singular = 'power_management'
7356        writer.write_start(singular)
7357        href = obj.href
7358        if href is not None:
7359            writer.write_attribute('href', href)
7360        if obj.address is not None:
7361            Writer.write_string(writer, 'address', obj.address)
7362        if obj.agents is not None:
7363            AgentWriter.write_many(obj.agents, writer, 'agent', 'agents')
7364        if obj.automatic_pm_enabled is not None:
7365            Writer.write_boolean(writer, 'automatic_pm_enabled', obj.automatic_pm_enabled)
7366        if obj.enabled is not None:
7367            Writer.write_boolean(writer, 'enabled', obj.enabled)
7368        if obj.kdump_detection is not None:
7369            Writer.write_boolean(writer, 'kdump_detection', obj.kdump_detection)
7370        if obj.options is not None:
7371            OptionWriter.write_many(obj.options, writer, 'option', 'options')
7372        if obj.password is not None:
7373            Writer.write_string(writer, 'password', obj.password)
7374        if obj.pm_proxies is not None:
7375            PmProxyWriter.write_many(obj.pm_proxies, writer, 'pm_proxy', 'pm_proxies')
7376        if obj.status is not None:
7377            Writer.write_string(writer, 'status', obj.status.value)
7378        if obj.type is not None:
7379            Writer.write_string(writer, 'type', obj.type)
7380        if obj.username is not None:
7381            Writer.write_string(writer, 'username', obj.username)
7382        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7384    @staticmethod
7385    def write_many(objs, writer, singular=None, plural=None):
7386        if singular is None:
7387            singular = 'power_management'
7388        if plural is None:
7389            plural = 'power_managements'
7390        writer.write_start(plural)
7391        if type(objs) == List:
7392            href = objs.href
7393            if href is not None:
7394                writer.write_attribute('href', href)
7395        for obj in objs:
7396            PowerManagementWriter.write_one(obj, writer, singular)
7397        writer.write_end()
class ProductWriter(ovirtsdk4.writer.Writer):
7400class ProductWriter(Writer):
7401
7402    def __init__(self):
7403        super(ProductWriter, self).__init__()
7404
7405    @staticmethod
7406    def write_one(obj, writer, singular=None):
7407        if singular is None:
7408            singular = 'product'
7409        writer.write_start(singular)
7410        href = obj.href
7411        if href is not None:
7412            writer.write_attribute('href', href)
7413        if obj.id is not None:
7414            writer.write_attribute('id', obj.id)
7415        if obj.comment is not None:
7416            Writer.write_string(writer, 'comment', obj.comment)
7417        if obj.description is not None:
7418            Writer.write_string(writer, 'description', obj.description)
7419        if obj.name is not None:
7420            Writer.write_string(writer, 'name', obj.name)
7421        writer.write_end()
7422
7423    @staticmethod
7424    def write_many(objs, writer, singular=None, plural=None):
7425        if singular is None:
7426            singular = 'product'
7427        if plural is None:
7428            plural = 'products'
7429        writer.write_start(plural)
7430        if type(objs) == List:
7431            href = objs.href
7432            if href is not None:
7433                writer.write_attribute('href', href)
7434        for obj in objs:
7435            ProductWriter.write_one(obj, writer, singular)
7436        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ProductWriter()
7402    def __init__(self):
7403        super(ProductWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7405    @staticmethod
7406    def write_one(obj, writer, singular=None):
7407        if singular is None:
7408            singular = 'product'
7409        writer.write_start(singular)
7410        href = obj.href
7411        if href is not None:
7412            writer.write_attribute('href', href)
7413        if obj.id is not None:
7414            writer.write_attribute('id', obj.id)
7415        if obj.comment is not None:
7416            Writer.write_string(writer, 'comment', obj.comment)
7417        if obj.description is not None:
7418            Writer.write_string(writer, 'description', obj.description)
7419        if obj.name is not None:
7420            Writer.write_string(writer, 'name', obj.name)
7421        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7423    @staticmethod
7424    def write_many(objs, writer, singular=None, plural=None):
7425        if singular is None:
7426            singular = 'product'
7427        if plural is None:
7428            plural = 'products'
7429        writer.write_start(plural)
7430        if type(objs) == List:
7431            href = objs.href
7432            if href is not None:
7433                writer.write_attribute('href', href)
7434        for obj in objs:
7435            ProductWriter.write_one(obj, writer, singular)
7436        writer.write_end()
class ProductInfoWriter(ovirtsdk4.writer.Writer):
7439class ProductInfoWriter(Writer):
7440
7441    def __init__(self):
7442        super(ProductInfoWriter, self).__init__()
7443
7444    @staticmethod
7445    def write_one(obj, writer, singular=None):
7446        if singular is None:
7447            singular = 'product_info'
7448        writer.write_start(singular)
7449        href = obj.href
7450        if href is not None:
7451            writer.write_attribute('href', href)
7452        if obj.instance_id is not None:
7453            Writer.write_string(writer, 'instance_id', obj.instance_id)
7454        if obj.name is not None:
7455            Writer.write_string(writer, 'name', obj.name)
7456        if obj.vendor is not None:
7457            Writer.write_string(writer, 'vendor', obj.vendor)
7458        if obj.version is not None:
7459            VersionWriter.write_one(obj.version, writer, 'version')
7460        writer.write_end()
7461
7462    @staticmethod
7463    def write_many(objs, writer, singular=None, plural=None):
7464        if singular is None:
7465            singular = 'product_info'
7466        if plural is None:
7467            plural = 'product_infos'
7468        writer.write_start(plural)
7469        if type(objs) == List:
7470            href = objs.href
7471            if href is not None:
7472                writer.write_attribute('href', href)
7473        for obj in objs:
7474            ProductInfoWriter.write_one(obj, writer, singular)
7475        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ProductInfoWriter()
7441    def __init__(self):
7442        super(ProductInfoWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7444    @staticmethod
7445    def write_one(obj, writer, singular=None):
7446        if singular is None:
7447            singular = 'product_info'
7448        writer.write_start(singular)
7449        href = obj.href
7450        if href is not None:
7451            writer.write_attribute('href', href)
7452        if obj.instance_id is not None:
7453            Writer.write_string(writer, 'instance_id', obj.instance_id)
7454        if obj.name is not None:
7455            Writer.write_string(writer, 'name', obj.name)
7456        if obj.vendor is not None:
7457            Writer.write_string(writer, 'vendor', obj.vendor)
7458        if obj.version is not None:
7459            VersionWriter.write_one(obj.version, writer, 'version')
7460        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7462    @staticmethod
7463    def write_many(objs, writer, singular=None, plural=None):
7464        if singular is None:
7465            singular = 'product_info'
7466        if plural is None:
7467            plural = 'product_infos'
7468        writer.write_start(plural)
7469        if type(objs) == List:
7470            href = objs.href
7471            if href is not None:
7472                writer.write_attribute('href', href)
7473        for obj in objs:
7474            ProductInfoWriter.write_one(obj, writer, singular)
7475        writer.write_end()
class ProfileDetailWriter(ovirtsdk4.writer.Writer):
7478class ProfileDetailWriter(Writer):
7479
7480    def __init__(self):
7481        super(ProfileDetailWriter, self).__init__()
7482
7483    @staticmethod
7484    def write_one(obj, writer, singular=None):
7485        if singular is None:
7486            singular = 'profile_detail'
7487        writer.write_start(singular)
7488        href = obj.href
7489        if href is not None:
7490            writer.write_attribute('href', href)
7491        if obj.block_statistics is not None:
7492            BlockStatisticWriter.write_many(obj.block_statistics, writer, 'block_statistic', 'block_statistics')
7493        if obj.duration is not None:
7494            Writer.write_integer(writer, 'duration', obj.duration)
7495        if obj.fop_statistics is not None:
7496            FopStatisticWriter.write_many(obj.fop_statistics, writer, 'fop_statistic', 'fop_statistics')
7497        if obj.profile_type is not None:
7498            Writer.write_string(writer, 'profile_type', obj.profile_type)
7499        if obj.statistics is not None:
7500            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
7501        writer.write_end()
7502
7503    @staticmethod
7504    def write_many(objs, writer, singular=None, plural=None):
7505        if singular is None:
7506            singular = 'profile_detail'
7507        if plural is None:
7508            plural = 'profile_details'
7509        writer.write_start(plural)
7510        if type(objs) == List:
7511            href = objs.href
7512            if href is not None:
7513                writer.write_attribute('href', href)
7514        for obj in objs:
7515            ProfileDetailWriter.write_one(obj, writer, singular)
7516        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ProfileDetailWriter()
7480    def __init__(self):
7481        super(ProfileDetailWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7483    @staticmethod
7484    def write_one(obj, writer, singular=None):
7485        if singular is None:
7486            singular = 'profile_detail'
7487        writer.write_start(singular)
7488        href = obj.href
7489        if href is not None:
7490            writer.write_attribute('href', href)
7491        if obj.block_statistics is not None:
7492            BlockStatisticWriter.write_many(obj.block_statistics, writer, 'block_statistic', 'block_statistics')
7493        if obj.duration is not None:
7494            Writer.write_integer(writer, 'duration', obj.duration)
7495        if obj.fop_statistics is not None:
7496            FopStatisticWriter.write_many(obj.fop_statistics, writer, 'fop_statistic', 'fop_statistics')
7497        if obj.profile_type is not None:
7498            Writer.write_string(writer, 'profile_type', obj.profile_type)
7499        if obj.statistics is not None:
7500            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
7501        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7503    @staticmethod
7504    def write_many(objs, writer, singular=None, plural=None):
7505        if singular is None:
7506            singular = 'profile_detail'
7507        if plural is None:
7508            plural = 'profile_details'
7509        writer.write_start(plural)
7510        if type(objs) == List:
7511            href = objs.href
7512            if href is not None:
7513                writer.write_attribute('href', href)
7514        for obj in objs:
7515            ProfileDetailWriter.write_one(obj, writer, singular)
7516        writer.write_end()
class PropertyWriter(ovirtsdk4.writer.Writer):
7519class PropertyWriter(Writer):
7520
7521    def __init__(self):
7522        super(PropertyWriter, self).__init__()
7523
7524    @staticmethod
7525    def write_one(obj, writer, singular=None):
7526        if singular is None:
7527            singular = 'property'
7528        writer.write_start(singular)
7529        href = obj.href
7530        if href is not None:
7531            writer.write_attribute('href', href)
7532        if obj.name is not None:
7533            Writer.write_string(writer, 'name', obj.name)
7534        if obj.value is not None:
7535            Writer.write_string(writer, 'value', obj.value)
7536        writer.write_end()
7537
7538    @staticmethod
7539    def write_many(objs, writer, singular=None, plural=None):
7540        if singular is None:
7541            singular = 'property'
7542        if plural is None:
7543            plural = 'properties'
7544        writer.write_start(plural)
7545        if type(objs) == List:
7546            href = objs.href
7547            if href is not None:
7548                writer.write_attribute('href', href)
7549        for obj in objs:
7550            PropertyWriter.write_one(obj, writer, singular)
7551        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

PropertyWriter()
7521    def __init__(self):
7522        super(PropertyWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7524    @staticmethod
7525    def write_one(obj, writer, singular=None):
7526        if singular is None:
7527            singular = 'property'
7528        writer.write_start(singular)
7529        href = obj.href
7530        if href is not None:
7531            writer.write_attribute('href', href)
7532        if obj.name is not None:
7533            Writer.write_string(writer, 'name', obj.name)
7534        if obj.value is not None:
7535            Writer.write_string(writer, 'value', obj.value)
7536        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7538    @staticmethod
7539    def write_many(objs, writer, singular=None, plural=None):
7540        if singular is None:
7541            singular = 'property'
7542        if plural is None:
7543            plural = 'properties'
7544        writer.write_start(plural)
7545        if type(objs) == List:
7546            href = objs.href
7547            if href is not None:
7548                writer.write_attribute('href', href)
7549        for obj in objs:
7550            PropertyWriter.write_one(obj, writer, singular)
7551        writer.write_end()
class ProxyTicketWriter(ovirtsdk4.writer.Writer):
7554class ProxyTicketWriter(Writer):
7555
7556    def __init__(self):
7557        super(ProxyTicketWriter, self).__init__()
7558
7559    @staticmethod
7560    def write_one(obj, writer, singular=None):
7561        if singular is None:
7562            singular = 'proxy_ticket'
7563        writer.write_start(singular)
7564        href = obj.href
7565        if href is not None:
7566            writer.write_attribute('href', href)
7567        if obj.value is not None:
7568            Writer.write_string(writer, 'value', obj.value)
7569        writer.write_end()
7570
7571    @staticmethod
7572    def write_many(objs, writer, singular=None, plural=None):
7573        if singular is None:
7574            singular = 'proxy_ticket'
7575        if plural is None:
7576            plural = 'proxy_tickets'
7577        writer.write_start(plural)
7578        if type(objs) == List:
7579            href = objs.href
7580            if href is not None:
7581                writer.write_attribute('href', href)
7582        for obj in objs:
7583            ProxyTicketWriter.write_one(obj, writer, singular)
7584        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ProxyTicketWriter()
7556    def __init__(self):
7557        super(ProxyTicketWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7559    @staticmethod
7560    def write_one(obj, writer, singular=None):
7561        if singular is None:
7562            singular = 'proxy_ticket'
7563        writer.write_start(singular)
7564        href = obj.href
7565        if href is not None:
7566            writer.write_attribute('href', href)
7567        if obj.value is not None:
7568            Writer.write_string(writer, 'value', obj.value)
7569        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7571    @staticmethod
7572    def write_many(objs, writer, singular=None, plural=None):
7573        if singular is None:
7574            singular = 'proxy_ticket'
7575        if plural is None:
7576            plural = 'proxy_tickets'
7577        writer.write_start(plural)
7578        if type(objs) == List:
7579            href = objs.href
7580            if href is not None:
7581                writer.write_attribute('href', href)
7582        for obj in objs:
7583            ProxyTicketWriter.write_one(obj, writer, singular)
7584        writer.write_end()
class QosWriter(ovirtsdk4.writer.Writer):
7587class QosWriter(Writer):
7588
7589    def __init__(self):
7590        super(QosWriter, self).__init__()
7591
7592    @staticmethod
7593    def write_one(obj, writer, singular=None):
7594        if singular is None:
7595            singular = 'qos'
7596        writer.write_start(singular)
7597        href = obj.href
7598        if href is not None:
7599            writer.write_attribute('href', href)
7600        if obj.id is not None:
7601            writer.write_attribute('id', obj.id)
7602        if obj.comment is not None:
7603            Writer.write_string(writer, 'comment', obj.comment)
7604        if obj.cpu_limit is not None:
7605            Writer.write_integer(writer, 'cpu_limit', obj.cpu_limit)
7606        if obj.description is not None:
7607            Writer.write_string(writer, 'description', obj.description)
7608        if obj.inbound_average is not None:
7609            Writer.write_integer(writer, 'inbound_average', obj.inbound_average)
7610        if obj.inbound_burst is not None:
7611            Writer.write_integer(writer, 'inbound_burst', obj.inbound_burst)
7612        if obj.inbound_peak is not None:
7613            Writer.write_integer(writer, 'inbound_peak', obj.inbound_peak)
7614        if obj.max_iops is not None:
7615            Writer.write_integer(writer, 'max_iops', obj.max_iops)
7616        if obj.max_read_iops is not None:
7617            Writer.write_integer(writer, 'max_read_iops', obj.max_read_iops)
7618        if obj.max_read_throughput is not None:
7619            Writer.write_integer(writer, 'max_read_throughput', obj.max_read_throughput)
7620        if obj.max_throughput is not None:
7621            Writer.write_integer(writer, 'max_throughput', obj.max_throughput)
7622        if obj.max_write_iops is not None:
7623            Writer.write_integer(writer, 'max_write_iops', obj.max_write_iops)
7624        if obj.max_write_throughput is not None:
7625            Writer.write_integer(writer, 'max_write_throughput', obj.max_write_throughput)
7626        if obj.name is not None:
7627            Writer.write_string(writer, 'name', obj.name)
7628        if obj.outbound_average is not None:
7629            Writer.write_integer(writer, 'outbound_average', obj.outbound_average)
7630        if obj.outbound_average_linkshare is not None:
7631            Writer.write_integer(writer, 'outbound_average_linkshare', obj.outbound_average_linkshare)
7632        if obj.outbound_average_realtime is not None:
7633            Writer.write_integer(writer, 'outbound_average_realtime', obj.outbound_average_realtime)
7634        if obj.outbound_average_upperlimit is not None:
7635            Writer.write_integer(writer, 'outbound_average_upperlimit', obj.outbound_average_upperlimit)
7636        if obj.outbound_burst is not None:
7637            Writer.write_integer(writer, 'outbound_burst', obj.outbound_burst)
7638        if obj.outbound_peak is not None:
7639            Writer.write_integer(writer, 'outbound_peak', obj.outbound_peak)
7640        if obj.type is not None:
7641            Writer.write_string(writer, 'type', obj.type.value)
7642        if obj.data_center is not None:
7643            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
7644        writer.write_end()
7645
7646    @staticmethod
7647    def write_many(objs, writer, singular=None, plural=None):
7648        if singular is None:
7649            singular = 'qos'
7650        if plural is None:
7651            plural = 'qoss'
7652        writer.write_start(plural)
7653        if type(objs) == List:
7654            href = objs.href
7655            if href is not None:
7656                writer.write_attribute('href', href)
7657        for obj in objs:
7658            QosWriter.write_one(obj, writer, singular)
7659        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

QosWriter()
7589    def __init__(self):
7590        super(QosWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7592    @staticmethod
7593    def write_one(obj, writer, singular=None):
7594        if singular is None:
7595            singular = 'qos'
7596        writer.write_start(singular)
7597        href = obj.href
7598        if href is not None:
7599            writer.write_attribute('href', href)
7600        if obj.id is not None:
7601            writer.write_attribute('id', obj.id)
7602        if obj.comment is not None:
7603            Writer.write_string(writer, 'comment', obj.comment)
7604        if obj.cpu_limit is not None:
7605            Writer.write_integer(writer, 'cpu_limit', obj.cpu_limit)
7606        if obj.description is not None:
7607            Writer.write_string(writer, 'description', obj.description)
7608        if obj.inbound_average is not None:
7609            Writer.write_integer(writer, 'inbound_average', obj.inbound_average)
7610        if obj.inbound_burst is not None:
7611            Writer.write_integer(writer, 'inbound_burst', obj.inbound_burst)
7612        if obj.inbound_peak is not None:
7613            Writer.write_integer(writer, 'inbound_peak', obj.inbound_peak)
7614        if obj.max_iops is not None:
7615            Writer.write_integer(writer, 'max_iops', obj.max_iops)
7616        if obj.max_read_iops is not None:
7617            Writer.write_integer(writer, 'max_read_iops', obj.max_read_iops)
7618        if obj.max_read_throughput is not None:
7619            Writer.write_integer(writer, 'max_read_throughput', obj.max_read_throughput)
7620        if obj.max_throughput is not None:
7621            Writer.write_integer(writer, 'max_throughput', obj.max_throughput)
7622        if obj.max_write_iops is not None:
7623            Writer.write_integer(writer, 'max_write_iops', obj.max_write_iops)
7624        if obj.max_write_throughput is not None:
7625            Writer.write_integer(writer, 'max_write_throughput', obj.max_write_throughput)
7626        if obj.name is not None:
7627            Writer.write_string(writer, 'name', obj.name)
7628        if obj.outbound_average is not None:
7629            Writer.write_integer(writer, 'outbound_average', obj.outbound_average)
7630        if obj.outbound_average_linkshare is not None:
7631            Writer.write_integer(writer, 'outbound_average_linkshare', obj.outbound_average_linkshare)
7632        if obj.outbound_average_realtime is not None:
7633            Writer.write_integer(writer, 'outbound_average_realtime', obj.outbound_average_realtime)
7634        if obj.outbound_average_upperlimit is not None:
7635            Writer.write_integer(writer, 'outbound_average_upperlimit', obj.outbound_average_upperlimit)
7636        if obj.outbound_burst is not None:
7637            Writer.write_integer(writer, 'outbound_burst', obj.outbound_burst)
7638        if obj.outbound_peak is not None:
7639            Writer.write_integer(writer, 'outbound_peak', obj.outbound_peak)
7640        if obj.type is not None:
7641            Writer.write_string(writer, 'type', obj.type.value)
7642        if obj.data_center is not None:
7643            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
7644        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7646    @staticmethod
7647    def write_many(objs, writer, singular=None, plural=None):
7648        if singular is None:
7649            singular = 'qos'
7650        if plural is None:
7651            plural = 'qoss'
7652        writer.write_start(plural)
7653        if type(objs) == List:
7654            href = objs.href
7655            if href is not None:
7656                writer.write_attribute('href', href)
7657        for obj in objs:
7658            QosWriter.write_one(obj, writer, singular)
7659        writer.write_end()
class QuotaWriter(ovirtsdk4.writer.Writer):
7662class QuotaWriter(Writer):
7663
7664    def __init__(self):
7665        super(QuotaWriter, self).__init__()
7666
7667    @staticmethod
7668    def write_one(obj, writer, singular=None):
7669        if singular is None:
7670            singular = 'quota'
7671        writer.write_start(singular)
7672        href = obj.href
7673        if href is not None:
7674            writer.write_attribute('href', href)
7675        if obj.id is not None:
7676            writer.write_attribute('id', obj.id)
7677        if obj.cluster_hard_limit_pct is not None:
7678            Writer.write_integer(writer, 'cluster_hard_limit_pct', obj.cluster_hard_limit_pct)
7679        if obj.cluster_soft_limit_pct is not None:
7680            Writer.write_integer(writer, 'cluster_soft_limit_pct', obj.cluster_soft_limit_pct)
7681        if obj.comment is not None:
7682            Writer.write_string(writer, 'comment', obj.comment)
7683        if obj.data_center is not None:
7684            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
7685        if obj.description is not None:
7686            Writer.write_string(writer, 'description', obj.description)
7687        if obj.disks is not None:
7688            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
7689        if obj.name is not None:
7690            Writer.write_string(writer, 'name', obj.name)
7691        if obj.storage_hard_limit_pct is not None:
7692            Writer.write_integer(writer, 'storage_hard_limit_pct', obj.storage_hard_limit_pct)
7693        if obj.storage_soft_limit_pct is not None:
7694            Writer.write_integer(writer, 'storage_soft_limit_pct', obj.storage_soft_limit_pct)
7695        if obj.users is not None:
7696            UserWriter.write_many(obj.users, writer, 'user', 'users')
7697        if obj.vms is not None:
7698            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
7699        if obj.permissions is not None:
7700            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
7701        if obj.quota_cluster_limits is not None:
7702            QuotaClusterLimitWriter.write_many(obj.quota_cluster_limits, writer, 'quota_cluster_limit', 'quota_cluster_limits')
7703        if obj.quota_storage_limits is not None:
7704            QuotaStorageLimitWriter.write_many(obj.quota_storage_limits, writer, 'quota_storage_limit', 'quota_storage_limits')
7705        writer.write_end()
7706
7707    @staticmethod
7708    def write_many(objs, writer, singular=None, plural=None):
7709        if singular is None:
7710            singular = 'quota'
7711        if plural is None:
7712            plural = 'quotas'
7713        writer.write_start(plural)
7714        if type(objs) == List:
7715            href = objs.href
7716            if href is not None:
7717                writer.write_attribute('href', href)
7718        for obj in objs:
7719            QuotaWriter.write_one(obj, writer, singular)
7720        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

QuotaWriter()
7664    def __init__(self):
7665        super(QuotaWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7667    @staticmethod
7668    def write_one(obj, writer, singular=None):
7669        if singular is None:
7670            singular = 'quota'
7671        writer.write_start(singular)
7672        href = obj.href
7673        if href is not None:
7674            writer.write_attribute('href', href)
7675        if obj.id is not None:
7676            writer.write_attribute('id', obj.id)
7677        if obj.cluster_hard_limit_pct is not None:
7678            Writer.write_integer(writer, 'cluster_hard_limit_pct', obj.cluster_hard_limit_pct)
7679        if obj.cluster_soft_limit_pct is not None:
7680            Writer.write_integer(writer, 'cluster_soft_limit_pct', obj.cluster_soft_limit_pct)
7681        if obj.comment is not None:
7682            Writer.write_string(writer, 'comment', obj.comment)
7683        if obj.data_center is not None:
7684            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
7685        if obj.description is not None:
7686            Writer.write_string(writer, 'description', obj.description)
7687        if obj.disks is not None:
7688            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
7689        if obj.name is not None:
7690            Writer.write_string(writer, 'name', obj.name)
7691        if obj.storage_hard_limit_pct is not None:
7692            Writer.write_integer(writer, 'storage_hard_limit_pct', obj.storage_hard_limit_pct)
7693        if obj.storage_soft_limit_pct is not None:
7694            Writer.write_integer(writer, 'storage_soft_limit_pct', obj.storage_soft_limit_pct)
7695        if obj.users is not None:
7696            UserWriter.write_many(obj.users, writer, 'user', 'users')
7697        if obj.vms is not None:
7698            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
7699        if obj.permissions is not None:
7700            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
7701        if obj.quota_cluster_limits is not None:
7702            QuotaClusterLimitWriter.write_many(obj.quota_cluster_limits, writer, 'quota_cluster_limit', 'quota_cluster_limits')
7703        if obj.quota_storage_limits is not None:
7704            QuotaStorageLimitWriter.write_many(obj.quota_storage_limits, writer, 'quota_storage_limit', 'quota_storage_limits')
7705        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7707    @staticmethod
7708    def write_many(objs, writer, singular=None, plural=None):
7709        if singular is None:
7710            singular = 'quota'
7711        if plural is None:
7712            plural = 'quotas'
7713        writer.write_start(plural)
7714        if type(objs) == List:
7715            href = objs.href
7716            if href is not None:
7717                writer.write_attribute('href', href)
7718        for obj in objs:
7719            QuotaWriter.write_one(obj, writer, singular)
7720        writer.write_end()
class QuotaClusterLimitWriter(ovirtsdk4.writer.Writer):
7723class QuotaClusterLimitWriter(Writer):
7724
7725    def __init__(self):
7726        super(QuotaClusterLimitWriter, self).__init__()
7727
7728    @staticmethod
7729    def write_one(obj, writer, singular=None):
7730        if singular is None:
7731            singular = 'quota_cluster_limit'
7732        writer.write_start(singular)
7733        href = obj.href
7734        if href is not None:
7735            writer.write_attribute('href', href)
7736        if obj.id is not None:
7737            writer.write_attribute('id', obj.id)
7738        if obj.comment is not None:
7739            Writer.write_string(writer, 'comment', obj.comment)
7740        if obj.description is not None:
7741            Writer.write_string(writer, 'description', obj.description)
7742        if obj.memory_limit is not None:
7743            Writer.write_decimal(writer, 'memory_limit', obj.memory_limit)
7744        if obj.memory_usage is not None:
7745            Writer.write_decimal(writer, 'memory_usage', obj.memory_usage)
7746        if obj.name is not None:
7747            Writer.write_string(writer, 'name', obj.name)
7748        if obj.vcpu_limit is not None:
7749            Writer.write_integer(writer, 'vcpu_limit', obj.vcpu_limit)
7750        if obj.vcpu_usage is not None:
7751            Writer.write_integer(writer, 'vcpu_usage', obj.vcpu_usage)
7752        if obj.cluster is not None:
7753            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
7754        if obj.quota is not None:
7755            QuotaWriter.write_one(obj.quota, writer, 'quota')
7756        writer.write_end()
7757
7758    @staticmethod
7759    def write_many(objs, writer, singular=None, plural=None):
7760        if singular is None:
7761            singular = 'quota_cluster_limit'
7762        if plural is None:
7763            plural = 'quota_cluster_limits'
7764        writer.write_start(plural)
7765        if type(objs) == List:
7766            href = objs.href
7767            if href is not None:
7768                writer.write_attribute('href', href)
7769        for obj in objs:
7770            QuotaClusterLimitWriter.write_one(obj, writer, singular)
7771        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

QuotaClusterLimitWriter()
7725    def __init__(self):
7726        super(QuotaClusterLimitWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7728    @staticmethod
7729    def write_one(obj, writer, singular=None):
7730        if singular is None:
7731            singular = 'quota_cluster_limit'
7732        writer.write_start(singular)
7733        href = obj.href
7734        if href is not None:
7735            writer.write_attribute('href', href)
7736        if obj.id is not None:
7737            writer.write_attribute('id', obj.id)
7738        if obj.comment is not None:
7739            Writer.write_string(writer, 'comment', obj.comment)
7740        if obj.description is not None:
7741            Writer.write_string(writer, 'description', obj.description)
7742        if obj.memory_limit is not None:
7743            Writer.write_decimal(writer, 'memory_limit', obj.memory_limit)
7744        if obj.memory_usage is not None:
7745            Writer.write_decimal(writer, 'memory_usage', obj.memory_usage)
7746        if obj.name is not None:
7747            Writer.write_string(writer, 'name', obj.name)
7748        if obj.vcpu_limit is not None:
7749            Writer.write_integer(writer, 'vcpu_limit', obj.vcpu_limit)
7750        if obj.vcpu_usage is not None:
7751            Writer.write_integer(writer, 'vcpu_usage', obj.vcpu_usage)
7752        if obj.cluster is not None:
7753            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
7754        if obj.quota is not None:
7755            QuotaWriter.write_one(obj.quota, writer, 'quota')
7756        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7758    @staticmethod
7759    def write_many(objs, writer, singular=None, plural=None):
7760        if singular is None:
7761            singular = 'quota_cluster_limit'
7762        if plural is None:
7763            plural = 'quota_cluster_limits'
7764        writer.write_start(plural)
7765        if type(objs) == List:
7766            href = objs.href
7767            if href is not None:
7768                writer.write_attribute('href', href)
7769        for obj in objs:
7770            QuotaClusterLimitWriter.write_one(obj, writer, singular)
7771        writer.write_end()
class QuotaStorageLimitWriter(ovirtsdk4.writer.Writer):
7774class QuotaStorageLimitWriter(Writer):
7775
7776    def __init__(self):
7777        super(QuotaStorageLimitWriter, self).__init__()
7778
7779    @staticmethod
7780    def write_one(obj, writer, singular=None):
7781        if singular is None:
7782            singular = 'quota_storage_limit'
7783        writer.write_start(singular)
7784        href = obj.href
7785        if href is not None:
7786            writer.write_attribute('href', href)
7787        if obj.id is not None:
7788            writer.write_attribute('id', obj.id)
7789        if obj.comment is not None:
7790            Writer.write_string(writer, 'comment', obj.comment)
7791        if obj.description is not None:
7792            Writer.write_string(writer, 'description', obj.description)
7793        if obj.limit is not None:
7794            Writer.write_integer(writer, 'limit', obj.limit)
7795        if obj.name is not None:
7796            Writer.write_string(writer, 'name', obj.name)
7797        if obj.usage is not None:
7798            Writer.write_decimal(writer, 'usage', obj.usage)
7799        if obj.quota is not None:
7800            QuotaWriter.write_one(obj.quota, writer, 'quota')
7801        if obj.storage_domain is not None:
7802            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
7803        writer.write_end()
7804
7805    @staticmethod
7806    def write_many(objs, writer, singular=None, plural=None):
7807        if singular is None:
7808            singular = 'quota_storage_limit'
7809        if plural is None:
7810            plural = 'quota_storage_limits'
7811        writer.write_start(plural)
7812        if type(objs) == List:
7813            href = objs.href
7814            if href is not None:
7815                writer.write_attribute('href', href)
7816        for obj in objs:
7817            QuotaStorageLimitWriter.write_one(obj, writer, singular)
7818        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

QuotaStorageLimitWriter()
7776    def __init__(self):
7777        super(QuotaStorageLimitWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7779    @staticmethod
7780    def write_one(obj, writer, singular=None):
7781        if singular is None:
7782            singular = 'quota_storage_limit'
7783        writer.write_start(singular)
7784        href = obj.href
7785        if href is not None:
7786            writer.write_attribute('href', href)
7787        if obj.id is not None:
7788            writer.write_attribute('id', obj.id)
7789        if obj.comment is not None:
7790            Writer.write_string(writer, 'comment', obj.comment)
7791        if obj.description is not None:
7792            Writer.write_string(writer, 'description', obj.description)
7793        if obj.limit is not None:
7794            Writer.write_integer(writer, 'limit', obj.limit)
7795        if obj.name is not None:
7796            Writer.write_string(writer, 'name', obj.name)
7797        if obj.usage is not None:
7798            Writer.write_decimal(writer, 'usage', obj.usage)
7799        if obj.quota is not None:
7800            QuotaWriter.write_one(obj.quota, writer, 'quota')
7801        if obj.storage_domain is not None:
7802            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
7803        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7805    @staticmethod
7806    def write_many(objs, writer, singular=None, plural=None):
7807        if singular is None:
7808            singular = 'quota_storage_limit'
7809        if plural is None:
7810            plural = 'quota_storage_limits'
7811        writer.write_start(plural)
7812        if type(objs) == List:
7813            href = objs.href
7814            if href is not None:
7815                writer.write_attribute('href', href)
7816        for obj in objs:
7817            QuotaStorageLimitWriter.write_one(obj, writer, singular)
7818        writer.write_end()
class RangeWriter(ovirtsdk4.writer.Writer):
7821class RangeWriter(Writer):
7822
7823    def __init__(self):
7824        super(RangeWriter, self).__init__()
7825
7826    @staticmethod
7827    def write_one(obj, writer, singular=None):
7828        if singular is None:
7829            singular = 'range'
7830        writer.write_start(singular)
7831        href = obj.href
7832        if href is not None:
7833            writer.write_attribute('href', href)
7834        if obj.from_ is not None:
7835            Writer.write_string(writer, 'from', obj.from_)
7836        if obj.to is not None:
7837            Writer.write_string(writer, 'to', obj.to)
7838        writer.write_end()
7839
7840    @staticmethod
7841    def write_many(objs, writer, singular=None, plural=None):
7842        if singular is None:
7843            singular = 'range'
7844        if plural is None:
7845            plural = 'ranges'
7846        writer.write_start(plural)
7847        if type(objs) == List:
7848            href = objs.href
7849            if href is not None:
7850                writer.write_attribute('href', href)
7851        for obj in objs:
7852            RangeWriter.write_one(obj, writer, singular)
7853        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

RangeWriter()
7823    def __init__(self):
7824        super(RangeWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7826    @staticmethod
7827    def write_one(obj, writer, singular=None):
7828        if singular is None:
7829            singular = 'range'
7830        writer.write_start(singular)
7831        href = obj.href
7832        if href is not None:
7833            writer.write_attribute('href', href)
7834        if obj.from_ is not None:
7835            Writer.write_string(writer, 'from', obj.from_)
7836        if obj.to is not None:
7837            Writer.write_string(writer, 'to', obj.to)
7838        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7840    @staticmethod
7841    def write_many(objs, writer, singular=None, plural=None):
7842        if singular is None:
7843            singular = 'range'
7844        if plural is None:
7845            plural = 'ranges'
7846        writer.write_start(plural)
7847        if type(objs) == List:
7848            href = objs.href
7849            if href is not None:
7850                writer.write_attribute('href', href)
7851        for obj in objs:
7852            RangeWriter.write_one(obj, writer, singular)
7853        writer.write_end()
class RateWriter(ovirtsdk4.writer.Writer):
7856class RateWriter(Writer):
7857
7858    def __init__(self):
7859        super(RateWriter, self).__init__()
7860
7861    @staticmethod
7862    def write_one(obj, writer, singular=None):
7863        if singular is None:
7864            singular = 'rate'
7865        writer.write_start(singular)
7866        href = obj.href
7867        if href is not None:
7868            writer.write_attribute('href', href)
7869        if obj.bytes is not None:
7870            Writer.write_integer(writer, 'bytes', obj.bytes)
7871        if obj.period is not None:
7872            Writer.write_integer(writer, 'period', obj.period)
7873        writer.write_end()
7874
7875    @staticmethod
7876    def write_many(objs, writer, singular=None, plural=None):
7877        if singular is None:
7878            singular = 'rate'
7879        if plural is None:
7880            plural = 'rates'
7881        writer.write_start(plural)
7882        if type(objs) == List:
7883            href = objs.href
7884            if href is not None:
7885                writer.write_attribute('href', href)
7886        for obj in objs:
7887            RateWriter.write_one(obj, writer, singular)
7888        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

RateWriter()
7858    def __init__(self):
7859        super(RateWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7861    @staticmethod
7862    def write_one(obj, writer, singular=None):
7863        if singular is None:
7864            singular = 'rate'
7865        writer.write_start(singular)
7866        href = obj.href
7867        if href is not None:
7868            writer.write_attribute('href', href)
7869        if obj.bytes is not None:
7870            Writer.write_integer(writer, 'bytes', obj.bytes)
7871        if obj.period is not None:
7872            Writer.write_integer(writer, 'period', obj.period)
7873        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7875    @staticmethod
7876    def write_many(objs, writer, singular=None, plural=None):
7877        if singular is None:
7878            singular = 'rate'
7879        if plural is None:
7880            plural = 'rates'
7881        writer.write_start(plural)
7882        if type(objs) == List:
7883            href = objs.href
7884            if href is not None:
7885                writer.write_attribute('href', href)
7886        for obj in objs:
7887            RateWriter.write_one(obj, writer, singular)
7888        writer.write_end()
class RegistrationAffinityGroupMappingWriter(ovirtsdk4.writer.Writer):
7891class RegistrationAffinityGroupMappingWriter(Writer):
7892
7893    def __init__(self):
7894        super(RegistrationAffinityGroupMappingWriter, self).__init__()
7895
7896    @staticmethod
7897    def write_one(obj, writer, singular=None):
7898        if singular is None:
7899            singular = 'registration_affinity_group_mapping'
7900        writer.write_start(singular)
7901        href = obj.href
7902        if href is not None:
7903            writer.write_attribute('href', href)
7904        if obj.from_ is not None:
7905            AffinityGroupWriter.write_one(obj.from_, writer, 'from')
7906        if obj.to is not None:
7907            AffinityGroupWriter.write_one(obj.to, writer, 'to')
7908        writer.write_end()
7909
7910    @staticmethod
7911    def write_many(objs, writer, singular=None, plural=None):
7912        if singular is None:
7913            singular = 'registration_affinity_group_mapping'
7914        if plural is None:
7915            plural = 'registration_affinity_group_mappings'
7916        writer.write_start(plural)
7917        if type(objs) == List:
7918            href = objs.href
7919            if href is not None:
7920                writer.write_attribute('href', href)
7921        for obj in objs:
7922            RegistrationAffinityGroupMappingWriter.write_one(obj, writer, singular)
7923        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

RegistrationAffinityGroupMappingWriter()
7893    def __init__(self):
7894        super(RegistrationAffinityGroupMappingWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7896    @staticmethod
7897    def write_one(obj, writer, singular=None):
7898        if singular is None:
7899            singular = 'registration_affinity_group_mapping'
7900        writer.write_start(singular)
7901        href = obj.href
7902        if href is not None:
7903            writer.write_attribute('href', href)
7904        if obj.from_ is not None:
7905            AffinityGroupWriter.write_one(obj.from_, writer, 'from')
7906        if obj.to is not None:
7907            AffinityGroupWriter.write_one(obj.to, writer, 'to')
7908        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7910    @staticmethod
7911    def write_many(objs, writer, singular=None, plural=None):
7912        if singular is None:
7913            singular = 'registration_affinity_group_mapping'
7914        if plural is None:
7915            plural = 'registration_affinity_group_mappings'
7916        writer.write_start(plural)
7917        if type(objs) == List:
7918            href = objs.href
7919            if href is not None:
7920                writer.write_attribute('href', href)
7921        for obj in objs:
7922            RegistrationAffinityGroupMappingWriter.write_one(obj, writer, singular)
7923        writer.write_end()
class RegistrationAffinityLabelMappingWriter(ovirtsdk4.writer.Writer):
7926class RegistrationAffinityLabelMappingWriter(Writer):
7927
7928    def __init__(self):
7929        super(RegistrationAffinityLabelMappingWriter, self).__init__()
7930
7931    @staticmethod
7932    def write_one(obj, writer, singular=None):
7933        if singular is None:
7934            singular = 'registration_affinity_label_mapping'
7935        writer.write_start(singular)
7936        href = obj.href
7937        if href is not None:
7938            writer.write_attribute('href', href)
7939        if obj.from_ is not None:
7940            AffinityLabelWriter.write_one(obj.from_, writer, 'from')
7941        if obj.to is not None:
7942            AffinityLabelWriter.write_one(obj.to, writer, 'to')
7943        writer.write_end()
7944
7945    @staticmethod
7946    def write_many(objs, writer, singular=None, plural=None):
7947        if singular is None:
7948            singular = 'registration_affinity_label_mapping'
7949        if plural is None:
7950            plural = 'registration_affinity_label_mappings'
7951        writer.write_start(plural)
7952        if type(objs) == List:
7953            href = objs.href
7954            if href is not None:
7955                writer.write_attribute('href', href)
7956        for obj in objs:
7957            RegistrationAffinityLabelMappingWriter.write_one(obj, writer, singular)
7958        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

RegistrationAffinityLabelMappingWriter()
7928    def __init__(self):
7929        super(RegistrationAffinityLabelMappingWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7931    @staticmethod
7932    def write_one(obj, writer, singular=None):
7933        if singular is None:
7934            singular = 'registration_affinity_label_mapping'
7935        writer.write_start(singular)
7936        href = obj.href
7937        if href is not None:
7938            writer.write_attribute('href', href)
7939        if obj.from_ is not None:
7940            AffinityLabelWriter.write_one(obj.from_, writer, 'from')
7941        if obj.to is not None:
7942            AffinityLabelWriter.write_one(obj.to, writer, 'to')
7943        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7945    @staticmethod
7946    def write_many(objs, writer, singular=None, plural=None):
7947        if singular is None:
7948            singular = 'registration_affinity_label_mapping'
7949        if plural is None:
7950            plural = 'registration_affinity_label_mappings'
7951        writer.write_start(plural)
7952        if type(objs) == List:
7953            href = objs.href
7954            if href is not None:
7955                writer.write_attribute('href', href)
7956        for obj in objs:
7957            RegistrationAffinityLabelMappingWriter.write_one(obj, writer, singular)
7958        writer.write_end()
class RegistrationClusterMappingWriter(ovirtsdk4.writer.Writer):
7961class RegistrationClusterMappingWriter(Writer):
7962
7963    def __init__(self):
7964        super(RegistrationClusterMappingWriter, self).__init__()
7965
7966    @staticmethod
7967    def write_one(obj, writer, singular=None):
7968        if singular is None:
7969            singular = 'registration_cluster_mapping'
7970        writer.write_start(singular)
7971        href = obj.href
7972        if href is not None:
7973            writer.write_attribute('href', href)
7974        if obj.from_ is not None:
7975            ClusterWriter.write_one(obj.from_, writer, 'from')
7976        if obj.to is not None:
7977            ClusterWriter.write_one(obj.to, writer, 'to')
7978        writer.write_end()
7979
7980    @staticmethod
7981    def write_many(objs, writer, singular=None, plural=None):
7982        if singular is None:
7983            singular = 'registration_cluster_mapping'
7984        if plural is None:
7985            plural = 'registration_cluster_mappings'
7986        writer.write_start(plural)
7987        if type(objs) == List:
7988            href = objs.href
7989            if href is not None:
7990                writer.write_attribute('href', href)
7991        for obj in objs:
7992            RegistrationClusterMappingWriter.write_one(obj, writer, singular)
7993        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

RegistrationClusterMappingWriter()
7963    def __init__(self):
7964        super(RegistrationClusterMappingWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
7966    @staticmethod
7967    def write_one(obj, writer, singular=None):
7968        if singular is None:
7969            singular = 'registration_cluster_mapping'
7970        writer.write_start(singular)
7971        href = obj.href
7972        if href is not None:
7973            writer.write_attribute('href', href)
7974        if obj.from_ is not None:
7975            ClusterWriter.write_one(obj.from_, writer, 'from')
7976        if obj.to is not None:
7977            ClusterWriter.write_one(obj.to, writer, 'to')
7978        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
7980    @staticmethod
7981    def write_many(objs, writer, singular=None, plural=None):
7982        if singular is None:
7983            singular = 'registration_cluster_mapping'
7984        if plural is None:
7985            plural = 'registration_cluster_mappings'
7986        writer.write_start(plural)
7987        if type(objs) == List:
7988            href = objs.href
7989            if href is not None:
7990                writer.write_attribute('href', href)
7991        for obj in objs:
7992            RegistrationClusterMappingWriter.write_one(obj, writer, singular)
7993        writer.write_end()
class RegistrationConfigurationWriter(ovirtsdk4.writer.Writer):
7996class RegistrationConfigurationWriter(Writer):
7997
7998    def __init__(self):
7999        super(RegistrationConfigurationWriter, self).__init__()
8000
8001    @staticmethod
8002    def write_one(obj, writer, singular=None):
8003        if singular is None:
8004            singular = 'registration_configuration'
8005        writer.write_start(singular)
8006        href = obj.href
8007        if href is not None:
8008            writer.write_attribute('href', href)
8009        if obj.affinity_group_mappings is not None:
8010            RegistrationAffinityGroupMappingWriter.write_many(obj.affinity_group_mappings, writer, 'registration_affinity_group_mapping', 'affinity_group_mappings')
8011        if obj.affinity_label_mappings is not None:
8012            RegistrationAffinityLabelMappingWriter.write_many(obj.affinity_label_mappings, writer, 'registration_affinity_label_mapping', 'affinity_label_mappings')
8013        if obj.cluster_mappings is not None:
8014            RegistrationClusterMappingWriter.write_many(obj.cluster_mappings, writer, 'registration_cluster_mapping', 'cluster_mappings')
8015        if obj.domain_mappings is not None:
8016            RegistrationDomainMappingWriter.write_many(obj.domain_mappings, writer, 'registration_domain_mapping', 'domain_mappings')
8017        if obj.lun_mappings is not None:
8018            RegistrationLunMappingWriter.write_many(obj.lun_mappings, writer, 'registration_lun_mapping', 'lun_mappings')
8019        if obj.role_mappings is not None:
8020            RegistrationRoleMappingWriter.write_many(obj.role_mappings, writer, 'registration_role_mapping', 'role_mappings')
8021        if obj.vnic_profile_mappings is not None:
8022            RegistrationVnicProfileMappingWriter.write_many(obj.vnic_profile_mappings, writer, 'registration_vnic_profile_mapping', 'vnic_profile_mappings')
8023        writer.write_end()
8024
8025    @staticmethod
8026    def write_many(objs, writer, singular=None, plural=None):
8027        if singular is None:
8028            singular = 'registration_configuration'
8029        if plural is None:
8030            plural = 'registration_configurations'
8031        writer.write_start(plural)
8032        if type(objs) == List:
8033            href = objs.href
8034            if href is not None:
8035                writer.write_attribute('href', href)
8036        for obj in objs:
8037            RegistrationConfigurationWriter.write_one(obj, writer, singular)
8038        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

RegistrationConfigurationWriter()
7998    def __init__(self):
7999        super(RegistrationConfigurationWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8001    @staticmethod
8002    def write_one(obj, writer, singular=None):
8003        if singular is None:
8004            singular = 'registration_configuration'
8005        writer.write_start(singular)
8006        href = obj.href
8007        if href is not None:
8008            writer.write_attribute('href', href)
8009        if obj.affinity_group_mappings is not None:
8010            RegistrationAffinityGroupMappingWriter.write_many(obj.affinity_group_mappings, writer, 'registration_affinity_group_mapping', 'affinity_group_mappings')
8011        if obj.affinity_label_mappings is not None:
8012            RegistrationAffinityLabelMappingWriter.write_many(obj.affinity_label_mappings, writer, 'registration_affinity_label_mapping', 'affinity_label_mappings')
8013        if obj.cluster_mappings is not None:
8014            RegistrationClusterMappingWriter.write_many(obj.cluster_mappings, writer, 'registration_cluster_mapping', 'cluster_mappings')
8015        if obj.domain_mappings is not None:
8016            RegistrationDomainMappingWriter.write_many(obj.domain_mappings, writer, 'registration_domain_mapping', 'domain_mappings')
8017        if obj.lun_mappings is not None:
8018            RegistrationLunMappingWriter.write_many(obj.lun_mappings, writer, 'registration_lun_mapping', 'lun_mappings')
8019        if obj.role_mappings is not None:
8020            RegistrationRoleMappingWriter.write_many(obj.role_mappings, writer, 'registration_role_mapping', 'role_mappings')
8021        if obj.vnic_profile_mappings is not None:
8022            RegistrationVnicProfileMappingWriter.write_many(obj.vnic_profile_mappings, writer, 'registration_vnic_profile_mapping', 'vnic_profile_mappings')
8023        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8025    @staticmethod
8026    def write_many(objs, writer, singular=None, plural=None):
8027        if singular is None:
8028            singular = 'registration_configuration'
8029        if plural is None:
8030            plural = 'registration_configurations'
8031        writer.write_start(plural)
8032        if type(objs) == List:
8033            href = objs.href
8034            if href is not None:
8035                writer.write_attribute('href', href)
8036        for obj in objs:
8037            RegistrationConfigurationWriter.write_one(obj, writer, singular)
8038        writer.write_end()
class RegistrationDomainMappingWriter(ovirtsdk4.writer.Writer):
8041class RegistrationDomainMappingWriter(Writer):
8042
8043    def __init__(self):
8044        super(RegistrationDomainMappingWriter, self).__init__()
8045
8046    @staticmethod
8047    def write_one(obj, writer, singular=None):
8048        if singular is None:
8049            singular = 'registration_domain_mapping'
8050        writer.write_start(singular)
8051        href = obj.href
8052        if href is not None:
8053            writer.write_attribute('href', href)
8054        if obj.from_ is not None:
8055            DomainWriter.write_one(obj.from_, writer, 'from')
8056        if obj.to is not None:
8057            DomainWriter.write_one(obj.to, writer, 'to')
8058        writer.write_end()
8059
8060    @staticmethod
8061    def write_many(objs, writer, singular=None, plural=None):
8062        if singular is None:
8063            singular = 'registration_domain_mapping'
8064        if plural is None:
8065            plural = 'registration_domain_mappings'
8066        writer.write_start(plural)
8067        if type(objs) == List:
8068            href = objs.href
8069            if href is not None:
8070                writer.write_attribute('href', href)
8071        for obj in objs:
8072            RegistrationDomainMappingWriter.write_one(obj, writer, singular)
8073        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

RegistrationDomainMappingWriter()
8043    def __init__(self):
8044        super(RegistrationDomainMappingWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8046    @staticmethod
8047    def write_one(obj, writer, singular=None):
8048        if singular is None:
8049            singular = 'registration_domain_mapping'
8050        writer.write_start(singular)
8051        href = obj.href
8052        if href is not None:
8053            writer.write_attribute('href', href)
8054        if obj.from_ is not None:
8055            DomainWriter.write_one(obj.from_, writer, 'from')
8056        if obj.to is not None:
8057            DomainWriter.write_one(obj.to, writer, 'to')
8058        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8060    @staticmethod
8061    def write_many(objs, writer, singular=None, plural=None):
8062        if singular is None:
8063            singular = 'registration_domain_mapping'
8064        if plural is None:
8065            plural = 'registration_domain_mappings'
8066        writer.write_start(plural)
8067        if type(objs) == List:
8068            href = objs.href
8069            if href is not None:
8070                writer.write_attribute('href', href)
8071        for obj in objs:
8072            RegistrationDomainMappingWriter.write_one(obj, writer, singular)
8073        writer.write_end()
class RegistrationLunMappingWriter(ovirtsdk4.writer.Writer):
8076class RegistrationLunMappingWriter(Writer):
8077
8078    def __init__(self):
8079        super(RegistrationLunMappingWriter, self).__init__()
8080
8081    @staticmethod
8082    def write_one(obj, writer, singular=None):
8083        if singular is None:
8084            singular = 'registration_lun_mapping'
8085        writer.write_start(singular)
8086        href = obj.href
8087        if href is not None:
8088            writer.write_attribute('href', href)
8089        if obj.from_ is not None:
8090            DiskWriter.write_one(obj.from_, writer, 'from')
8091        if obj.to is not None:
8092            DiskWriter.write_one(obj.to, writer, 'to')
8093        writer.write_end()
8094
8095    @staticmethod
8096    def write_many(objs, writer, singular=None, plural=None):
8097        if singular is None:
8098            singular = 'registration_lun_mapping'
8099        if plural is None:
8100            plural = 'registration_lun_mappings'
8101        writer.write_start(plural)
8102        if type(objs) == List:
8103            href = objs.href
8104            if href is not None:
8105                writer.write_attribute('href', href)
8106        for obj in objs:
8107            RegistrationLunMappingWriter.write_one(obj, writer, singular)
8108        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

RegistrationLunMappingWriter()
8078    def __init__(self):
8079        super(RegistrationLunMappingWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8081    @staticmethod
8082    def write_one(obj, writer, singular=None):
8083        if singular is None:
8084            singular = 'registration_lun_mapping'
8085        writer.write_start(singular)
8086        href = obj.href
8087        if href is not None:
8088            writer.write_attribute('href', href)
8089        if obj.from_ is not None:
8090            DiskWriter.write_one(obj.from_, writer, 'from')
8091        if obj.to is not None:
8092            DiskWriter.write_one(obj.to, writer, 'to')
8093        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8095    @staticmethod
8096    def write_many(objs, writer, singular=None, plural=None):
8097        if singular is None:
8098            singular = 'registration_lun_mapping'
8099        if plural is None:
8100            plural = 'registration_lun_mappings'
8101        writer.write_start(plural)
8102        if type(objs) == List:
8103            href = objs.href
8104            if href is not None:
8105                writer.write_attribute('href', href)
8106        for obj in objs:
8107            RegistrationLunMappingWriter.write_one(obj, writer, singular)
8108        writer.write_end()
class RegistrationRoleMappingWriter(ovirtsdk4.writer.Writer):
8111class RegistrationRoleMappingWriter(Writer):
8112
8113    def __init__(self):
8114        super(RegistrationRoleMappingWriter, self).__init__()
8115
8116    @staticmethod
8117    def write_one(obj, writer, singular=None):
8118        if singular is None:
8119            singular = 'registration_role_mapping'
8120        writer.write_start(singular)
8121        href = obj.href
8122        if href is not None:
8123            writer.write_attribute('href', href)
8124        if obj.from_ is not None:
8125            RoleWriter.write_one(obj.from_, writer, 'from')
8126        if obj.to is not None:
8127            RoleWriter.write_one(obj.to, writer, 'to')
8128        writer.write_end()
8129
8130    @staticmethod
8131    def write_many(objs, writer, singular=None, plural=None):
8132        if singular is None:
8133            singular = 'registration_role_mapping'
8134        if plural is None:
8135            plural = 'registration_role_mappings'
8136        writer.write_start(plural)
8137        if type(objs) == List:
8138            href = objs.href
8139            if href is not None:
8140                writer.write_attribute('href', href)
8141        for obj in objs:
8142            RegistrationRoleMappingWriter.write_one(obj, writer, singular)
8143        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

RegistrationRoleMappingWriter()
8113    def __init__(self):
8114        super(RegistrationRoleMappingWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8116    @staticmethod
8117    def write_one(obj, writer, singular=None):
8118        if singular is None:
8119            singular = 'registration_role_mapping'
8120        writer.write_start(singular)
8121        href = obj.href
8122        if href is not None:
8123            writer.write_attribute('href', href)
8124        if obj.from_ is not None:
8125            RoleWriter.write_one(obj.from_, writer, 'from')
8126        if obj.to is not None:
8127            RoleWriter.write_one(obj.to, writer, 'to')
8128        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8130    @staticmethod
8131    def write_many(objs, writer, singular=None, plural=None):
8132        if singular is None:
8133            singular = 'registration_role_mapping'
8134        if plural is None:
8135            plural = 'registration_role_mappings'
8136        writer.write_start(plural)
8137        if type(objs) == List:
8138            href = objs.href
8139            if href is not None:
8140                writer.write_attribute('href', href)
8141        for obj in objs:
8142            RegistrationRoleMappingWriter.write_one(obj, writer, singular)
8143        writer.write_end()
class RegistrationVnicProfileMappingWriter(ovirtsdk4.writer.Writer):
8146class RegistrationVnicProfileMappingWriter(Writer):
8147
8148    def __init__(self):
8149        super(RegistrationVnicProfileMappingWriter, self).__init__()
8150
8151    @staticmethod
8152    def write_one(obj, writer, singular=None):
8153        if singular is None:
8154            singular = 'registration_vnic_profile_mapping'
8155        writer.write_start(singular)
8156        href = obj.href
8157        if href is not None:
8158            writer.write_attribute('href', href)
8159        if obj.from_ is not None:
8160            VnicProfileWriter.write_one(obj.from_, writer, 'from')
8161        if obj.to is not None:
8162            VnicProfileWriter.write_one(obj.to, writer, 'to')
8163        writer.write_end()
8164
8165    @staticmethod
8166    def write_many(objs, writer, singular=None, plural=None):
8167        if singular is None:
8168            singular = 'registration_vnic_profile_mapping'
8169        if plural is None:
8170            plural = 'registration_vnic_profile_mappings'
8171        writer.write_start(plural)
8172        if type(objs) == List:
8173            href = objs.href
8174            if href is not None:
8175                writer.write_attribute('href', href)
8176        for obj in objs:
8177            RegistrationVnicProfileMappingWriter.write_one(obj, writer, singular)
8178        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

RegistrationVnicProfileMappingWriter()
8148    def __init__(self):
8149        super(RegistrationVnicProfileMappingWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8151    @staticmethod
8152    def write_one(obj, writer, singular=None):
8153        if singular is None:
8154            singular = 'registration_vnic_profile_mapping'
8155        writer.write_start(singular)
8156        href = obj.href
8157        if href is not None:
8158            writer.write_attribute('href', href)
8159        if obj.from_ is not None:
8160            VnicProfileWriter.write_one(obj.from_, writer, 'from')
8161        if obj.to is not None:
8162            VnicProfileWriter.write_one(obj.to, writer, 'to')
8163        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8165    @staticmethod
8166    def write_many(objs, writer, singular=None, plural=None):
8167        if singular is None:
8168            singular = 'registration_vnic_profile_mapping'
8169        if plural is None:
8170            plural = 'registration_vnic_profile_mappings'
8171        writer.write_start(plural)
8172        if type(objs) == List:
8173            href = objs.href
8174            if href is not None:
8175                writer.write_attribute('href', href)
8176        for obj in objs:
8177            RegistrationVnicProfileMappingWriter.write_one(obj, writer, singular)
8178        writer.write_end()
class ReportedConfigurationWriter(ovirtsdk4.writer.Writer):
8181class ReportedConfigurationWriter(Writer):
8182
8183    def __init__(self):
8184        super(ReportedConfigurationWriter, self).__init__()
8185
8186    @staticmethod
8187    def write_one(obj, writer, singular=None):
8188        if singular is None:
8189            singular = 'reported_configuration'
8190        writer.write_start(singular)
8191        href = obj.href
8192        if href is not None:
8193            writer.write_attribute('href', href)
8194        if obj.actual_value is not None:
8195            Writer.write_string(writer, 'actual_value', obj.actual_value)
8196        if obj.expected_value is not None:
8197            Writer.write_string(writer, 'expected_value', obj.expected_value)
8198        if obj.in_sync is not None:
8199            Writer.write_boolean(writer, 'in_sync', obj.in_sync)
8200        if obj.name is not None:
8201            Writer.write_string(writer, 'name', obj.name)
8202        writer.write_end()
8203
8204    @staticmethod
8205    def write_many(objs, writer, singular=None, plural=None):
8206        if singular is None:
8207            singular = 'reported_configuration'
8208        if plural is None:
8209            plural = 'reported_configurations'
8210        writer.write_start(plural)
8211        if type(objs) == List:
8212            href = objs.href
8213            if href is not None:
8214                writer.write_attribute('href', href)
8215        for obj in objs:
8216            ReportedConfigurationWriter.write_one(obj, writer, singular)
8217        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ReportedConfigurationWriter()
8183    def __init__(self):
8184        super(ReportedConfigurationWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8186    @staticmethod
8187    def write_one(obj, writer, singular=None):
8188        if singular is None:
8189            singular = 'reported_configuration'
8190        writer.write_start(singular)
8191        href = obj.href
8192        if href is not None:
8193            writer.write_attribute('href', href)
8194        if obj.actual_value is not None:
8195            Writer.write_string(writer, 'actual_value', obj.actual_value)
8196        if obj.expected_value is not None:
8197            Writer.write_string(writer, 'expected_value', obj.expected_value)
8198        if obj.in_sync is not None:
8199            Writer.write_boolean(writer, 'in_sync', obj.in_sync)
8200        if obj.name is not None:
8201            Writer.write_string(writer, 'name', obj.name)
8202        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8204    @staticmethod
8205    def write_many(objs, writer, singular=None, plural=None):
8206        if singular is None:
8207            singular = 'reported_configuration'
8208        if plural is None:
8209            plural = 'reported_configurations'
8210        writer.write_start(plural)
8211        if type(objs) == List:
8212            href = objs.href
8213            if href is not None:
8214                writer.write_attribute('href', href)
8215        for obj in objs:
8216            ReportedConfigurationWriter.write_one(obj, writer, singular)
8217        writer.write_end()
class ReportedDeviceWriter(ovirtsdk4.writer.Writer):
8220class ReportedDeviceWriter(Writer):
8221
8222    def __init__(self):
8223        super(ReportedDeviceWriter, self).__init__()
8224
8225    @staticmethod
8226    def write_one(obj, writer, singular=None):
8227        if singular is None:
8228            singular = 'reported_device'
8229        writer.write_start(singular)
8230        href = obj.href
8231        if href is not None:
8232            writer.write_attribute('href', href)
8233        if obj.id is not None:
8234            writer.write_attribute('id', obj.id)
8235        if obj.comment is not None:
8236            Writer.write_string(writer, 'comment', obj.comment)
8237        if obj.description is not None:
8238            Writer.write_string(writer, 'description', obj.description)
8239        if obj.ips is not None:
8240            IpWriter.write_many(obj.ips, writer, 'ip', 'ips')
8241        if obj.mac is not None:
8242            MacWriter.write_one(obj.mac, writer, 'mac')
8243        if obj.name is not None:
8244            Writer.write_string(writer, 'name', obj.name)
8245        if obj.type is not None:
8246            Writer.write_string(writer, 'type', obj.type.value)
8247        if obj.vm is not None:
8248            VmWriter.write_one(obj.vm, writer, 'vm')
8249        writer.write_end()
8250
8251    @staticmethod
8252    def write_many(objs, writer, singular=None, plural=None):
8253        if singular is None:
8254            singular = 'reported_device'
8255        if plural is None:
8256            plural = 'reported_devices'
8257        writer.write_start(plural)
8258        if type(objs) == List:
8259            href = objs.href
8260            if href is not None:
8261                writer.write_attribute('href', href)
8262        for obj in objs:
8263            ReportedDeviceWriter.write_one(obj, writer, singular)
8264        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ReportedDeviceWriter()
8222    def __init__(self):
8223        super(ReportedDeviceWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8225    @staticmethod
8226    def write_one(obj, writer, singular=None):
8227        if singular is None:
8228            singular = 'reported_device'
8229        writer.write_start(singular)
8230        href = obj.href
8231        if href is not None:
8232            writer.write_attribute('href', href)
8233        if obj.id is not None:
8234            writer.write_attribute('id', obj.id)
8235        if obj.comment is not None:
8236            Writer.write_string(writer, 'comment', obj.comment)
8237        if obj.description is not None:
8238            Writer.write_string(writer, 'description', obj.description)
8239        if obj.ips is not None:
8240            IpWriter.write_many(obj.ips, writer, 'ip', 'ips')
8241        if obj.mac is not None:
8242            MacWriter.write_one(obj.mac, writer, 'mac')
8243        if obj.name is not None:
8244            Writer.write_string(writer, 'name', obj.name)
8245        if obj.type is not None:
8246            Writer.write_string(writer, 'type', obj.type.value)
8247        if obj.vm is not None:
8248            VmWriter.write_one(obj.vm, writer, 'vm')
8249        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8251    @staticmethod
8252    def write_many(objs, writer, singular=None, plural=None):
8253        if singular is None:
8254            singular = 'reported_device'
8255        if plural is None:
8256            plural = 'reported_devices'
8257        writer.write_start(plural)
8258        if type(objs) == List:
8259            href = objs.href
8260            if href is not None:
8261                writer.write_attribute('href', href)
8262        for obj in objs:
8263            ReportedDeviceWriter.write_one(obj, writer, singular)
8264        writer.write_end()
class RngDeviceWriter(ovirtsdk4.writer.Writer):
8267class RngDeviceWriter(Writer):
8268
8269    def __init__(self):
8270        super(RngDeviceWriter, self).__init__()
8271
8272    @staticmethod
8273    def write_one(obj, writer, singular=None):
8274        if singular is None:
8275            singular = 'rng_device'
8276        writer.write_start(singular)
8277        href = obj.href
8278        if href is not None:
8279            writer.write_attribute('href', href)
8280        if obj.rate is not None:
8281            RateWriter.write_one(obj.rate, writer, 'rate')
8282        if obj.source is not None:
8283            Writer.write_string(writer, 'source', obj.source.value)
8284        writer.write_end()
8285
8286    @staticmethod
8287    def write_many(objs, writer, singular=None, plural=None):
8288        if singular is None:
8289            singular = 'rng_device'
8290        if plural is None:
8291            plural = 'rng_devices'
8292        writer.write_start(plural)
8293        if type(objs) == List:
8294            href = objs.href
8295            if href is not None:
8296                writer.write_attribute('href', href)
8297        for obj in objs:
8298            RngDeviceWriter.write_one(obj, writer, singular)
8299        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

RngDeviceWriter()
8269    def __init__(self):
8270        super(RngDeviceWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8272    @staticmethod
8273    def write_one(obj, writer, singular=None):
8274        if singular is None:
8275            singular = 'rng_device'
8276        writer.write_start(singular)
8277        href = obj.href
8278        if href is not None:
8279            writer.write_attribute('href', href)
8280        if obj.rate is not None:
8281            RateWriter.write_one(obj.rate, writer, 'rate')
8282        if obj.source is not None:
8283            Writer.write_string(writer, 'source', obj.source.value)
8284        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8286    @staticmethod
8287    def write_many(objs, writer, singular=None, plural=None):
8288        if singular is None:
8289            singular = 'rng_device'
8290        if plural is None:
8291            plural = 'rng_devices'
8292        writer.write_start(plural)
8293        if type(objs) == List:
8294            href = objs.href
8295            if href is not None:
8296                writer.write_attribute('href', href)
8297        for obj in objs:
8298            RngDeviceWriter.write_one(obj, writer, singular)
8299        writer.write_end()
class RoleWriter(ovirtsdk4.writer.Writer):
8302class RoleWriter(Writer):
8303
8304    def __init__(self):
8305        super(RoleWriter, self).__init__()
8306
8307    @staticmethod
8308    def write_one(obj, writer, singular=None):
8309        if singular is None:
8310            singular = 'role'
8311        writer.write_start(singular)
8312        href = obj.href
8313        if href is not None:
8314            writer.write_attribute('href', href)
8315        if obj.id is not None:
8316            writer.write_attribute('id', obj.id)
8317        if obj.administrative is not None:
8318            Writer.write_boolean(writer, 'administrative', obj.administrative)
8319        if obj.comment is not None:
8320            Writer.write_string(writer, 'comment', obj.comment)
8321        if obj.description is not None:
8322            Writer.write_string(writer, 'description', obj.description)
8323        if obj.mutable is not None:
8324            Writer.write_boolean(writer, 'mutable', obj.mutable)
8325        if obj.name is not None:
8326            Writer.write_string(writer, 'name', obj.name)
8327        if obj.permits is not None:
8328            PermitWriter.write_many(obj.permits, writer, 'permit', 'permits')
8329        if obj.user is not None:
8330            UserWriter.write_one(obj.user, writer, 'user')
8331        writer.write_end()
8332
8333    @staticmethod
8334    def write_many(objs, writer, singular=None, plural=None):
8335        if singular is None:
8336            singular = 'role'
8337        if plural is None:
8338            plural = 'roles'
8339        writer.write_start(plural)
8340        if type(objs) == List:
8341            href = objs.href
8342            if href is not None:
8343                writer.write_attribute('href', href)
8344        for obj in objs:
8345            RoleWriter.write_one(obj, writer, singular)
8346        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

RoleWriter()
8304    def __init__(self):
8305        super(RoleWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8307    @staticmethod
8308    def write_one(obj, writer, singular=None):
8309        if singular is None:
8310            singular = 'role'
8311        writer.write_start(singular)
8312        href = obj.href
8313        if href is not None:
8314            writer.write_attribute('href', href)
8315        if obj.id is not None:
8316            writer.write_attribute('id', obj.id)
8317        if obj.administrative is not None:
8318            Writer.write_boolean(writer, 'administrative', obj.administrative)
8319        if obj.comment is not None:
8320            Writer.write_string(writer, 'comment', obj.comment)
8321        if obj.description is not None:
8322            Writer.write_string(writer, 'description', obj.description)
8323        if obj.mutable is not None:
8324            Writer.write_boolean(writer, 'mutable', obj.mutable)
8325        if obj.name is not None:
8326            Writer.write_string(writer, 'name', obj.name)
8327        if obj.permits is not None:
8328            PermitWriter.write_many(obj.permits, writer, 'permit', 'permits')
8329        if obj.user is not None:
8330            UserWriter.write_one(obj.user, writer, 'user')
8331        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8333    @staticmethod
8334    def write_many(objs, writer, singular=None, plural=None):
8335        if singular is None:
8336            singular = 'role'
8337        if plural is None:
8338            plural = 'roles'
8339        writer.write_start(plural)
8340        if type(objs) == List:
8341            href = objs.href
8342            if href is not None:
8343                writer.write_attribute('href', href)
8344        for obj in objs:
8345            RoleWriter.write_one(obj, writer, singular)
8346        writer.write_end()
class SchedulingPolicyWriter(ovirtsdk4.writer.Writer):
8349class SchedulingPolicyWriter(Writer):
8350
8351    def __init__(self):
8352        super(SchedulingPolicyWriter, self).__init__()
8353
8354    @staticmethod
8355    def write_one(obj, writer, singular=None):
8356        if singular is None:
8357            singular = 'scheduling_policy'
8358        writer.write_start(singular)
8359        href = obj.href
8360        if href is not None:
8361            writer.write_attribute('href', href)
8362        if obj.id is not None:
8363            writer.write_attribute('id', obj.id)
8364        if obj.comment is not None:
8365            Writer.write_string(writer, 'comment', obj.comment)
8366        if obj.default_policy is not None:
8367            Writer.write_boolean(writer, 'default_policy', obj.default_policy)
8368        if obj.description is not None:
8369            Writer.write_string(writer, 'description', obj.description)
8370        if obj.locked is not None:
8371            Writer.write_boolean(writer, 'locked', obj.locked)
8372        if obj.name is not None:
8373            Writer.write_string(writer, 'name', obj.name)
8374        if obj.properties is not None:
8375            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
8376        if obj.balances is not None:
8377            BalanceWriter.write_many(obj.balances, writer, 'balance', 'balances')
8378        if obj.filters is not None:
8379            FilterWriter.write_many(obj.filters, writer, 'filter', 'filters')
8380        if obj.weight is not None:
8381            WeightWriter.write_many(obj.weight, writer, 'weight', 'weight')
8382        writer.write_end()
8383
8384    @staticmethod
8385    def write_many(objs, writer, singular=None, plural=None):
8386        if singular is None:
8387            singular = 'scheduling_policy'
8388        if plural is None:
8389            plural = 'scheduling_policies'
8390        writer.write_start(plural)
8391        if type(objs) == List:
8392            href = objs.href
8393            if href is not None:
8394                writer.write_attribute('href', href)
8395        for obj in objs:
8396            SchedulingPolicyWriter.write_one(obj, writer, singular)
8397        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

SchedulingPolicyWriter()
8351    def __init__(self):
8352        super(SchedulingPolicyWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8354    @staticmethod
8355    def write_one(obj, writer, singular=None):
8356        if singular is None:
8357            singular = 'scheduling_policy'
8358        writer.write_start(singular)
8359        href = obj.href
8360        if href is not None:
8361            writer.write_attribute('href', href)
8362        if obj.id is not None:
8363            writer.write_attribute('id', obj.id)
8364        if obj.comment is not None:
8365            Writer.write_string(writer, 'comment', obj.comment)
8366        if obj.default_policy is not None:
8367            Writer.write_boolean(writer, 'default_policy', obj.default_policy)
8368        if obj.description is not None:
8369            Writer.write_string(writer, 'description', obj.description)
8370        if obj.locked is not None:
8371            Writer.write_boolean(writer, 'locked', obj.locked)
8372        if obj.name is not None:
8373            Writer.write_string(writer, 'name', obj.name)
8374        if obj.properties is not None:
8375            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
8376        if obj.balances is not None:
8377            BalanceWriter.write_many(obj.balances, writer, 'balance', 'balances')
8378        if obj.filters is not None:
8379            FilterWriter.write_many(obj.filters, writer, 'filter', 'filters')
8380        if obj.weight is not None:
8381            WeightWriter.write_many(obj.weight, writer, 'weight', 'weight')
8382        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8384    @staticmethod
8385    def write_many(objs, writer, singular=None, plural=None):
8386        if singular is None:
8387            singular = 'scheduling_policy'
8388        if plural is None:
8389            plural = 'scheduling_policies'
8390        writer.write_start(plural)
8391        if type(objs) == List:
8392            href = objs.href
8393            if href is not None:
8394                writer.write_attribute('href', href)
8395        for obj in objs:
8396            SchedulingPolicyWriter.write_one(obj, writer, singular)
8397        writer.write_end()
class SchedulingPolicyUnitWriter(ovirtsdk4.writer.Writer):
8400class SchedulingPolicyUnitWriter(Writer):
8401
8402    def __init__(self):
8403        super(SchedulingPolicyUnitWriter, self).__init__()
8404
8405    @staticmethod
8406    def write_one(obj, writer, singular=None):
8407        if singular is None:
8408            singular = 'scheduling_policy_unit'
8409        writer.write_start(singular)
8410        href = obj.href
8411        if href is not None:
8412            writer.write_attribute('href', href)
8413        if obj.id is not None:
8414            writer.write_attribute('id', obj.id)
8415        if obj.comment is not None:
8416            Writer.write_string(writer, 'comment', obj.comment)
8417        if obj.description is not None:
8418            Writer.write_string(writer, 'description', obj.description)
8419        if obj.enabled is not None:
8420            Writer.write_boolean(writer, 'enabled', obj.enabled)
8421        if obj.internal is not None:
8422            Writer.write_boolean(writer, 'internal', obj.internal)
8423        if obj.name is not None:
8424            Writer.write_string(writer, 'name', obj.name)
8425        if obj.properties is not None:
8426            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
8427        if obj.type is not None:
8428            Writer.write_string(writer, 'type', obj.type.value)
8429        writer.write_end()
8430
8431    @staticmethod
8432    def write_many(objs, writer, singular=None, plural=None):
8433        if singular is None:
8434            singular = 'scheduling_policy_unit'
8435        if plural is None:
8436            plural = 'scheduling_policy_units'
8437        writer.write_start(plural)
8438        if type(objs) == List:
8439            href = objs.href
8440            if href is not None:
8441                writer.write_attribute('href', href)
8442        for obj in objs:
8443            SchedulingPolicyUnitWriter.write_one(obj, writer, singular)
8444        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

SchedulingPolicyUnitWriter()
8402    def __init__(self):
8403        super(SchedulingPolicyUnitWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8405    @staticmethod
8406    def write_one(obj, writer, singular=None):
8407        if singular is None:
8408            singular = 'scheduling_policy_unit'
8409        writer.write_start(singular)
8410        href = obj.href
8411        if href is not None:
8412            writer.write_attribute('href', href)
8413        if obj.id is not None:
8414            writer.write_attribute('id', obj.id)
8415        if obj.comment is not None:
8416            Writer.write_string(writer, 'comment', obj.comment)
8417        if obj.description is not None:
8418            Writer.write_string(writer, 'description', obj.description)
8419        if obj.enabled is not None:
8420            Writer.write_boolean(writer, 'enabled', obj.enabled)
8421        if obj.internal is not None:
8422            Writer.write_boolean(writer, 'internal', obj.internal)
8423        if obj.name is not None:
8424            Writer.write_string(writer, 'name', obj.name)
8425        if obj.properties is not None:
8426            PropertyWriter.write_many(obj.properties, writer, 'property', 'properties')
8427        if obj.type is not None:
8428            Writer.write_string(writer, 'type', obj.type.value)
8429        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8431    @staticmethod
8432    def write_many(objs, writer, singular=None, plural=None):
8433        if singular is None:
8434            singular = 'scheduling_policy_unit'
8435        if plural is None:
8436            plural = 'scheduling_policy_units'
8437        writer.write_start(plural)
8438        if type(objs) == List:
8439            href = objs.href
8440            if href is not None:
8441                writer.write_attribute('href', href)
8442        for obj in objs:
8443            SchedulingPolicyUnitWriter.write_one(obj, writer, singular)
8444        writer.write_end()
class SeLinuxWriter(ovirtsdk4.writer.Writer):
8447class SeLinuxWriter(Writer):
8448
8449    def __init__(self):
8450        super(SeLinuxWriter, self).__init__()
8451
8452    @staticmethod
8453    def write_one(obj, writer, singular=None):
8454        if singular is None:
8455            singular = 'se_linux'
8456        writer.write_start(singular)
8457        href = obj.href
8458        if href is not None:
8459            writer.write_attribute('href', href)
8460        if obj.mode is not None:
8461            Writer.write_string(writer, 'mode', obj.mode.value)
8462        writer.write_end()
8463
8464    @staticmethod
8465    def write_many(objs, writer, singular=None, plural=None):
8466        if singular is None:
8467            singular = 'se_linux'
8468        if plural is None:
8469            plural = 'se_linuxs'
8470        writer.write_start(plural)
8471        if type(objs) == List:
8472            href = objs.href
8473            if href is not None:
8474                writer.write_attribute('href', href)
8475        for obj in objs:
8476            SeLinuxWriter.write_one(obj, writer, singular)
8477        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

SeLinuxWriter()
8449    def __init__(self):
8450        super(SeLinuxWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8452    @staticmethod
8453    def write_one(obj, writer, singular=None):
8454        if singular is None:
8455            singular = 'se_linux'
8456        writer.write_start(singular)
8457        href = obj.href
8458        if href is not None:
8459            writer.write_attribute('href', href)
8460        if obj.mode is not None:
8461            Writer.write_string(writer, 'mode', obj.mode.value)
8462        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8464    @staticmethod
8465    def write_many(objs, writer, singular=None, plural=None):
8466        if singular is None:
8467            singular = 'se_linux'
8468        if plural is None:
8469            plural = 'se_linuxs'
8470        writer.write_start(plural)
8471        if type(objs) == List:
8472            href = objs.href
8473            if href is not None:
8474                writer.write_attribute('href', href)
8475        for obj in objs:
8476            SeLinuxWriter.write_one(obj, writer, singular)
8477        writer.write_end()
class SerialNumberWriter(ovirtsdk4.writer.Writer):
8480class SerialNumberWriter(Writer):
8481
8482    def __init__(self):
8483        super(SerialNumberWriter, self).__init__()
8484
8485    @staticmethod
8486    def write_one(obj, writer, singular=None):
8487        if singular is None:
8488            singular = 'serial_number'
8489        writer.write_start(singular)
8490        href = obj.href
8491        if href is not None:
8492            writer.write_attribute('href', href)
8493        if obj.policy is not None:
8494            Writer.write_string(writer, 'policy', obj.policy.value)
8495        if obj.value is not None:
8496            Writer.write_string(writer, 'value', obj.value)
8497        writer.write_end()
8498
8499    @staticmethod
8500    def write_many(objs, writer, singular=None, plural=None):
8501        if singular is None:
8502            singular = 'serial_number'
8503        if plural is None:
8504            plural = 'serial_numbers'
8505        writer.write_start(plural)
8506        if type(objs) == List:
8507            href = objs.href
8508            if href is not None:
8509                writer.write_attribute('href', href)
8510        for obj in objs:
8511            SerialNumberWriter.write_one(obj, writer, singular)
8512        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

SerialNumberWriter()
8482    def __init__(self):
8483        super(SerialNumberWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8485    @staticmethod
8486    def write_one(obj, writer, singular=None):
8487        if singular is None:
8488            singular = 'serial_number'
8489        writer.write_start(singular)
8490        href = obj.href
8491        if href is not None:
8492            writer.write_attribute('href', href)
8493        if obj.policy is not None:
8494            Writer.write_string(writer, 'policy', obj.policy.value)
8495        if obj.value is not None:
8496            Writer.write_string(writer, 'value', obj.value)
8497        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8499    @staticmethod
8500    def write_many(objs, writer, singular=None, plural=None):
8501        if singular is None:
8502            singular = 'serial_number'
8503        if plural is None:
8504            plural = 'serial_numbers'
8505        writer.write_start(plural)
8506        if type(objs) == List:
8507            href = objs.href
8508            if href is not None:
8509                writer.write_attribute('href', href)
8510        for obj in objs:
8511            SerialNumberWriter.write_one(obj, writer, singular)
8512        writer.write_end()
class SessionWriter(ovirtsdk4.writer.Writer):
8515class SessionWriter(Writer):
8516
8517    def __init__(self):
8518        super(SessionWriter, self).__init__()
8519
8520    @staticmethod
8521    def write_one(obj, writer, singular=None):
8522        if singular is None:
8523            singular = 'session'
8524        writer.write_start(singular)
8525        href = obj.href
8526        if href is not None:
8527            writer.write_attribute('href', href)
8528        if obj.id is not None:
8529            writer.write_attribute('id', obj.id)
8530        if obj.comment is not None:
8531            Writer.write_string(writer, 'comment', obj.comment)
8532        if obj.console_user is not None:
8533            Writer.write_boolean(writer, 'console_user', obj.console_user)
8534        if obj.description is not None:
8535            Writer.write_string(writer, 'description', obj.description)
8536        if obj.ip is not None:
8537            IpWriter.write_one(obj.ip, writer, 'ip')
8538        if obj.name is not None:
8539            Writer.write_string(writer, 'name', obj.name)
8540        if obj.protocol is not None:
8541            Writer.write_string(writer, 'protocol', obj.protocol)
8542        if obj.user is not None:
8543            UserWriter.write_one(obj.user, writer, 'user')
8544        if obj.vm is not None:
8545            VmWriter.write_one(obj.vm, writer, 'vm')
8546        writer.write_end()
8547
8548    @staticmethod
8549    def write_many(objs, writer, singular=None, plural=None):
8550        if singular is None:
8551            singular = 'session'
8552        if plural is None:
8553            plural = 'sessions'
8554        writer.write_start(plural)
8555        if type(objs) == List:
8556            href = objs.href
8557            if href is not None:
8558                writer.write_attribute('href', href)
8559        for obj in objs:
8560            SessionWriter.write_one(obj, writer, singular)
8561        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

SessionWriter()
8517    def __init__(self):
8518        super(SessionWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8520    @staticmethod
8521    def write_one(obj, writer, singular=None):
8522        if singular is None:
8523            singular = 'session'
8524        writer.write_start(singular)
8525        href = obj.href
8526        if href is not None:
8527            writer.write_attribute('href', href)
8528        if obj.id is not None:
8529            writer.write_attribute('id', obj.id)
8530        if obj.comment is not None:
8531            Writer.write_string(writer, 'comment', obj.comment)
8532        if obj.console_user is not None:
8533            Writer.write_boolean(writer, 'console_user', obj.console_user)
8534        if obj.description is not None:
8535            Writer.write_string(writer, 'description', obj.description)
8536        if obj.ip is not None:
8537            IpWriter.write_one(obj.ip, writer, 'ip')
8538        if obj.name is not None:
8539            Writer.write_string(writer, 'name', obj.name)
8540        if obj.protocol is not None:
8541            Writer.write_string(writer, 'protocol', obj.protocol)
8542        if obj.user is not None:
8543            UserWriter.write_one(obj.user, writer, 'user')
8544        if obj.vm is not None:
8545            VmWriter.write_one(obj.vm, writer, 'vm')
8546        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8548    @staticmethod
8549    def write_many(objs, writer, singular=None, plural=None):
8550        if singular is None:
8551            singular = 'session'
8552        if plural is None:
8553            plural = 'sessions'
8554        writer.write_start(plural)
8555        if type(objs) == List:
8556            href = objs.href
8557            if href is not None:
8558                writer.write_attribute('href', href)
8559        for obj in objs:
8560            SessionWriter.write_one(obj, writer, singular)
8561        writer.write_end()
class SkipIfConnectivityBrokenWriter(ovirtsdk4.writer.Writer):
8564class SkipIfConnectivityBrokenWriter(Writer):
8565
8566    def __init__(self):
8567        super(SkipIfConnectivityBrokenWriter, self).__init__()
8568
8569    @staticmethod
8570    def write_one(obj, writer, singular=None):
8571        if singular is None:
8572            singular = 'skip_if_connectivity_broken'
8573        writer.write_start(singular)
8574        href = obj.href
8575        if href is not None:
8576            writer.write_attribute('href', href)
8577        if obj.enabled is not None:
8578            Writer.write_boolean(writer, 'enabled', obj.enabled)
8579        if obj.threshold is not None:
8580            Writer.write_integer(writer, 'threshold', obj.threshold)
8581        writer.write_end()
8582
8583    @staticmethod
8584    def write_many(objs, writer, singular=None, plural=None):
8585        if singular is None:
8586            singular = 'skip_if_connectivity_broken'
8587        if plural is None:
8588            plural = 'skip_if_connectivity_brokens'
8589        writer.write_start(plural)
8590        if type(objs) == List:
8591            href = objs.href
8592            if href is not None:
8593                writer.write_attribute('href', href)
8594        for obj in objs:
8595            SkipIfConnectivityBrokenWriter.write_one(obj, writer, singular)
8596        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

SkipIfConnectivityBrokenWriter()
8566    def __init__(self):
8567        super(SkipIfConnectivityBrokenWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8569    @staticmethod
8570    def write_one(obj, writer, singular=None):
8571        if singular is None:
8572            singular = 'skip_if_connectivity_broken'
8573        writer.write_start(singular)
8574        href = obj.href
8575        if href is not None:
8576            writer.write_attribute('href', href)
8577        if obj.enabled is not None:
8578            Writer.write_boolean(writer, 'enabled', obj.enabled)
8579        if obj.threshold is not None:
8580            Writer.write_integer(writer, 'threshold', obj.threshold)
8581        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8583    @staticmethod
8584    def write_many(objs, writer, singular=None, plural=None):
8585        if singular is None:
8586            singular = 'skip_if_connectivity_broken'
8587        if plural is None:
8588            plural = 'skip_if_connectivity_brokens'
8589        writer.write_start(plural)
8590        if type(objs) == List:
8591            href = objs.href
8592            if href is not None:
8593                writer.write_attribute('href', href)
8594        for obj in objs:
8595            SkipIfConnectivityBrokenWriter.write_one(obj, writer, singular)
8596        writer.write_end()
class SkipIfSdActiveWriter(ovirtsdk4.writer.Writer):
8599class SkipIfSdActiveWriter(Writer):
8600
8601    def __init__(self):
8602        super(SkipIfSdActiveWriter, self).__init__()
8603
8604    @staticmethod
8605    def write_one(obj, writer, singular=None):
8606        if singular is None:
8607            singular = 'skip_if_sd_active'
8608        writer.write_start(singular)
8609        href = obj.href
8610        if href is not None:
8611            writer.write_attribute('href', href)
8612        if obj.enabled is not None:
8613            Writer.write_boolean(writer, 'enabled', obj.enabled)
8614        writer.write_end()
8615
8616    @staticmethod
8617    def write_many(objs, writer, singular=None, plural=None):
8618        if singular is None:
8619            singular = 'skip_if_sd_active'
8620        if plural is None:
8621            plural = 'skip_if_sd_actives'
8622        writer.write_start(plural)
8623        if type(objs) == List:
8624            href = objs.href
8625            if href is not None:
8626                writer.write_attribute('href', href)
8627        for obj in objs:
8628            SkipIfSdActiveWriter.write_one(obj, writer, singular)
8629        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

SkipIfSdActiveWriter()
8601    def __init__(self):
8602        super(SkipIfSdActiveWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8604    @staticmethod
8605    def write_one(obj, writer, singular=None):
8606        if singular is None:
8607            singular = 'skip_if_sd_active'
8608        writer.write_start(singular)
8609        href = obj.href
8610        if href is not None:
8611            writer.write_attribute('href', href)
8612        if obj.enabled is not None:
8613            Writer.write_boolean(writer, 'enabled', obj.enabled)
8614        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8616    @staticmethod
8617    def write_many(objs, writer, singular=None, plural=None):
8618        if singular is None:
8619            singular = 'skip_if_sd_active'
8620        if plural is None:
8621            plural = 'skip_if_sd_actives'
8622        writer.write_start(plural)
8623        if type(objs) == List:
8624            href = objs.href
8625            if href is not None:
8626                writer.write_attribute('href', href)
8627        for obj in objs:
8628            SkipIfSdActiveWriter.write_one(obj, writer, singular)
8629        writer.write_end()
class SnapshotWriter(ovirtsdk4.writer.Writer):
8632class SnapshotWriter(Writer):
8633
8634    def __init__(self):
8635        super(SnapshotWriter, self).__init__()
8636
8637    @staticmethod
8638    def write_one(obj, writer, singular=None):
8639        if singular is None:
8640            singular = 'snapshot'
8641        writer.write_start(singular)
8642        href = obj.href
8643        if href is not None:
8644            writer.write_attribute('href', href)
8645        if obj.id is not None:
8646            writer.write_attribute('id', obj.id)
8647        if obj.auto_pinning_policy is not None:
8648            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
8649        if obj.bios is not None:
8650            BiosWriter.write_one(obj.bios, writer, 'bios')
8651        if obj.comment is not None:
8652            Writer.write_string(writer, 'comment', obj.comment)
8653        if obj.console is not None:
8654            ConsoleWriter.write_one(obj.console, writer, 'console')
8655        if obj.cpu is not None:
8656            CpuWriter.write_one(obj.cpu, writer, 'cpu')
8657        if obj.cpu_pinning_policy is not None:
8658            Writer.write_string(writer, 'cpu_pinning_policy', obj.cpu_pinning_policy.value)
8659        if obj.cpu_shares is not None:
8660            Writer.write_integer(writer, 'cpu_shares', obj.cpu_shares)
8661        if obj.creation_time is not None:
8662            Writer.write_date(writer, 'creation_time', obj.creation_time)
8663        if obj.custom_compatibility_version is not None:
8664            VersionWriter.write_one(obj.custom_compatibility_version, writer, 'custom_compatibility_version')
8665        if obj.custom_cpu_model is not None:
8666            Writer.write_string(writer, 'custom_cpu_model', obj.custom_cpu_model)
8667        if obj.custom_emulated_machine is not None:
8668            Writer.write_string(writer, 'custom_emulated_machine', obj.custom_emulated_machine)
8669        if obj.custom_properties is not None:
8670            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
8671        if obj.date is not None:
8672            Writer.write_date(writer, 'date', obj.date)
8673        if obj.delete_protected is not None:
8674            Writer.write_boolean(writer, 'delete_protected', obj.delete_protected)
8675        if obj.description is not None:
8676            Writer.write_string(writer, 'description', obj.description)
8677        if obj.display is not None:
8678            DisplayWriter.write_one(obj.display, writer, 'display')
8679        if obj.domain is not None:
8680            DomainWriter.write_one(obj.domain, writer, 'domain')
8681        if obj.fqdn is not None:
8682            Writer.write_string(writer, 'fqdn', obj.fqdn)
8683        if obj.guest_operating_system is not None:
8684            GuestOperatingSystemWriter.write_one(obj.guest_operating_system, writer, 'guest_operating_system')
8685        if obj.guest_time_zone is not None:
8686            TimeZoneWriter.write_one(obj.guest_time_zone, writer, 'guest_time_zone')
8687        if obj.has_illegal_images is not None:
8688            Writer.write_boolean(writer, 'has_illegal_images', obj.has_illegal_images)
8689        if obj.high_availability is not None:
8690            HighAvailabilityWriter.write_one(obj.high_availability, writer, 'high_availability')
8691        if obj.initialization is not None:
8692            InitializationWriter.write_one(obj.initialization, writer, 'initialization')
8693        if obj.io is not None:
8694            IoWriter.write_one(obj.io, writer, 'io')
8695        if obj.large_icon is not None:
8696            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
8697        if obj.lease is not None:
8698            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
8699        if obj.memory is not None:
8700            Writer.write_integer(writer, 'memory', obj.memory)
8701        if obj.memory_policy is not None:
8702            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
8703        if obj.migration is not None:
8704            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
8705        if obj.migration_downtime is not None:
8706            Writer.write_integer(writer, 'migration_downtime', obj.migration_downtime)
8707        if obj.multi_queues_enabled is not None:
8708            Writer.write_boolean(writer, 'multi_queues_enabled', obj.multi_queues_enabled)
8709        if obj.name is not None:
8710            Writer.write_string(writer, 'name', obj.name)
8711        if obj.next_run_configuration_exists is not None:
8712            Writer.write_boolean(writer, 'next_run_configuration_exists', obj.next_run_configuration_exists)
8713        if obj.numa_tune_mode is not None:
8714            Writer.write_string(writer, 'numa_tune_mode', obj.numa_tune_mode.value)
8715        if obj.origin is not None:
8716            Writer.write_string(writer, 'origin', obj.origin)
8717        if obj.os is not None:
8718            OperatingSystemWriter.write_one(obj.os, writer, 'os')
8719        if obj.payloads is not None:
8720            PayloadWriter.write_many(obj.payloads, writer, 'payload', 'payloads')
8721        if obj.persist_memorystate is not None:
8722            Writer.write_boolean(writer, 'persist_memorystate', obj.persist_memorystate)
8723        if obj.placement_policy is not None:
8724            VmPlacementPolicyWriter.write_one(obj.placement_policy, writer, 'placement_policy')
8725        if obj.rng_device is not None:
8726            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
8727        if obj.run_once is not None:
8728            Writer.write_boolean(writer, 'run_once', obj.run_once)
8729        if obj.serial_number is not None:
8730            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
8731        if obj.small_icon is not None:
8732            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
8733        if obj.snapshot_status is not None:
8734            Writer.write_string(writer, 'snapshot_status', obj.snapshot_status.value)
8735        if obj.snapshot_type is not None:
8736            Writer.write_string(writer, 'snapshot_type', obj.snapshot_type.value)
8737        if obj.soundcard_enabled is not None:
8738            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
8739        if obj.sso is not None:
8740            SsoWriter.write_one(obj.sso, writer, 'sso')
8741        if obj.start_paused is not None:
8742            Writer.write_boolean(writer, 'start_paused', obj.start_paused)
8743        if obj.start_time is not None:
8744            Writer.write_date(writer, 'start_time', obj.start_time)
8745        if obj.stateless is not None:
8746            Writer.write_boolean(writer, 'stateless', obj.stateless)
8747        if obj.status is not None:
8748            Writer.write_string(writer, 'status', obj.status.value)
8749        if obj.status_detail is not None:
8750            Writer.write_string(writer, 'status_detail', obj.status_detail)
8751        if obj.stop_reason is not None:
8752            Writer.write_string(writer, 'stop_reason', obj.stop_reason)
8753        if obj.stop_time is not None:
8754            Writer.write_date(writer, 'stop_time', obj.stop_time)
8755        if obj.storage_error_resume_behaviour is not None:
8756            Writer.write_string(writer, 'storage_error_resume_behaviour', obj.storage_error_resume_behaviour.value)
8757        if obj.time_zone is not None:
8758            TimeZoneWriter.write_one(obj.time_zone, writer, 'time_zone')
8759        if obj.tpm_enabled is not None:
8760            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
8761        if obj.tunnel_migration is not None:
8762            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
8763        if obj.type is not None:
8764            Writer.write_string(writer, 'type', obj.type.value)
8765        if obj.usb is not None:
8766            UsbWriter.write_one(obj.usb, writer, 'usb')
8767        if obj.use_latest_template_version is not None:
8768            Writer.write_boolean(writer, 'use_latest_template_version', obj.use_latest_template_version)
8769        if obj.virtio_scsi is not None:
8770            VirtioScsiWriter.write_one(obj.virtio_scsi, writer, 'virtio_scsi')
8771        if obj.virtio_scsi_multi_queues is not None:
8772            Writer.write_integer(writer, 'virtio_scsi_multi_queues', obj.virtio_scsi_multi_queues)
8773        if obj.virtio_scsi_multi_queues_enabled is not None:
8774            Writer.write_boolean(writer, 'virtio_scsi_multi_queues_enabled', obj.virtio_scsi_multi_queues_enabled)
8775        if obj.affinity_labels is not None:
8776            AffinityLabelWriter.write_many(obj.affinity_labels, writer, 'affinity_label', 'affinity_labels')
8777        if obj.applications is not None:
8778            ApplicationWriter.write_many(obj.applications, writer, 'application', 'applications')
8779        if obj.cdroms is not None:
8780            CdromWriter.write_many(obj.cdroms, writer, 'cdrom', 'cdroms')
8781        if obj.cluster is not None:
8782            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
8783        if obj.cpu_profile is not None:
8784            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
8785        if obj.disk_attachments is not None:
8786            DiskAttachmentWriter.write_many(obj.disk_attachments, writer, 'disk_attachment', 'disk_attachments')
8787        if obj.disks is not None:
8788            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
8789        if obj.dynamic_cpu is not None:
8790            DynamicCpuWriter.write_one(obj.dynamic_cpu, writer, 'dynamic_cpu')
8791        if obj.external_host_provider is not None:
8792            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
8793        if obj.floppies is not None:
8794            FloppyWriter.write_many(obj.floppies, writer, 'floppy', 'floppies')
8795        if obj.graphics_consoles is not None:
8796            GraphicsConsoleWriter.write_many(obj.graphics_consoles, writer, 'graphics_console', 'graphics_consoles')
8797        if obj.host is not None:
8798            HostWriter.write_one(obj.host, writer, 'host')
8799        if obj.host_devices is not None:
8800            HostDeviceWriter.write_many(obj.host_devices, writer, 'host_device', 'host_devices')
8801        if obj.instance_type is not None:
8802            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
8803        if obj.katello_errata is not None:
8804            KatelloErratumWriter.write_many(obj.katello_errata, writer, 'katello_erratum', 'katello_errata')
8805        if obj.mediated_devices is not None:
8806            VmMediatedDeviceWriter.write_many(obj.mediated_devices, writer, 'vm_mediated_device', 'mediated_devices')
8807        if obj.nics is not None:
8808            NicWriter.write_many(obj.nics, writer, 'nic', 'nics')
8809        if obj.numa_nodes is not None:
8810            NumaNodeWriter.write_many(obj.numa_nodes, writer, 'host_numa_node', 'host_numa_nodes')
8811        if obj.original_template is not None:
8812            TemplateWriter.write_one(obj.original_template, writer, 'original_template')
8813        if obj.permissions is not None:
8814            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
8815        if obj.quota is not None:
8816            QuotaWriter.write_one(obj.quota, writer, 'quota')
8817        if obj.reported_devices is not None:
8818            ReportedDeviceWriter.write_many(obj.reported_devices, writer, 'reported_device', 'reported_devices')
8819        if obj.sessions is not None:
8820            SessionWriter.write_many(obj.sessions, writer, 'session', 'sessions')
8821        if obj.snapshots is not None:
8822            SnapshotWriter.write_many(obj.snapshots, writer, 'snapshot', 'snapshots')
8823        if obj.statistics is not None:
8824            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
8825        if obj.storage_domain is not None:
8826            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
8827        if obj.tags is not None:
8828            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
8829        if obj.template is not None:
8830            TemplateWriter.write_one(obj.template, writer, 'template')
8831        if obj.vm is not None:
8832            VmWriter.write_one(obj.vm, writer, 'vm')
8833        if obj.vm_pool is not None:
8834            VmPoolWriter.write_one(obj.vm_pool, writer, 'vm_pool')
8835        if obj.watchdogs is not None:
8836            WatchdogWriter.write_many(obj.watchdogs, writer, 'watchdog', 'watchdogs')
8837        writer.write_end()
8838
8839    @staticmethod
8840    def write_many(objs, writer, singular=None, plural=None):
8841        if singular is None:
8842            singular = 'snapshot'
8843        if plural is None:
8844            plural = 'snapshots'
8845        writer.write_start(plural)
8846        if type(objs) == List:
8847            href = objs.href
8848            if href is not None:
8849                writer.write_attribute('href', href)
8850        for obj in objs:
8851            SnapshotWriter.write_one(obj, writer, singular)
8852        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

SnapshotWriter()
8634    def __init__(self):
8635        super(SnapshotWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8637    @staticmethod
8638    def write_one(obj, writer, singular=None):
8639        if singular is None:
8640            singular = 'snapshot'
8641        writer.write_start(singular)
8642        href = obj.href
8643        if href is not None:
8644            writer.write_attribute('href', href)
8645        if obj.id is not None:
8646            writer.write_attribute('id', obj.id)
8647        if obj.auto_pinning_policy is not None:
8648            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
8649        if obj.bios is not None:
8650            BiosWriter.write_one(obj.bios, writer, 'bios')
8651        if obj.comment is not None:
8652            Writer.write_string(writer, 'comment', obj.comment)
8653        if obj.console is not None:
8654            ConsoleWriter.write_one(obj.console, writer, 'console')
8655        if obj.cpu is not None:
8656            CpuWriter.write_one(obj.cpu, writer, 'cpu')
8657        if obj.cpu_pinning_policy is not None:
8658            Writer.write_string(writer, 'cpu_pinning_policy', obj.cpu_pinning_policy.value)
8659        if obj.cpu_shares is not None:
8660            Writer.write_integer(writer, 'cpu_shares', obj.cpu_shares)
8661        if obj.creation_time is not None:
8662            Writer.write_date(writer, 'creation_time', obj.creation_time)
8663        if obj.custom_compatibility_version is not None:
8664            VersionWriter.write_one(obj.custom_compatibility_version, writer, 'custom_compatibility_version')
8665        if obj.custom_cpu_model is not None:
8666            Writer.write_string(writer, 'custom_cpu_model', obj.custom_cpu_model)
8667        if obj.custom_emulated_machine is not None:
8668            Writer.write_string(writer, 'custom_emulated_machine', obj.custom_emulated_machine)
8669        if obj.custom_properties is not None:
8670            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
8671        if obj.date is not None:
8672            Writer.write_date(writer, 'date', obj.date)
8673        if obj.delete_protected is not None:
8674            Writer.write_boolean(writer, 'delete_protected', obj.delete_protected)
8675        if obj.description is not None:
8676            Writer.write_string(writer, 'description', obj.description)
8677        if obj.display is not None:
8678            DisplayWriter.write_one(obj.display, writer, 'display')
8679        if obj.domain is not None:
8680            DomainWriter.write_one(obj.domain, writer, 'domain')
8681        if obj.fqdn is not None:
8682            Writer.write_string(writer, 'fqdn', obj.fqdn)
8683        if obj.guest_operating_system is not None:
8684            GuestOperatingSystemWriter.write_one(obj.guest_operating_system, writer, 'guest_operating_system')
8685        if obj.guest_time_zone is not None:
8686            TimeZoneWriter.write_one(obj.guest_time_zone, writer, 'guest_time_zone')
8687        if obj.has_illegal_images is not None:
8688            Writer.write_boolean(writer, 'has_illegal_images', obj.has_illegal_images)
8689        if obj.high_availability is not None:
8690            HighAvailabilityWriter.write_one(obj.high_availability, writer, 'high_availability')
8691        if obj.initialization is not None:
8692            InitializationWriter.write_one(obj.initialization, writer, 'initialization')
8693        if obj.io is not None:
8694            IoWriter.write_one(obj.io, writer, 'io')
8695        if obj.large_icon is not None:
8696            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
8697        if obj.lease is not None:
8698            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
8699        if obj.memory is not None:
8700            Writer.write_integer(writer, 'memory', obj.memory)
8701        if obj.memory_policy is not None:
8702            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
8703        if obj.migration is not None:
8704            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
8705        if obj.migration_downtime is not None:
8706            Writer.write_integer(writer, 'migration_downtime', obj.migration_downtime)
8707        if obj.multi_queues_enabled is not None:
8708            Writer.write_boolean(writer, 'multi_queues_enabled', obj.multi_queues_enabled)
8709        if obj.name is not None:
8710            Writer.write_string(writer, 'name', obj.name)
8711        if obj.next_run_configuration_exists is not None:
8712            Writer.write_boolean(writer, 'next_run_configuration_exists', obj.next_run_configuration_exists)
8713        if obj.numa_tune_mode is not None:
8714            Writer.write_string(writer, 'numa_tune_mode', obj.numa_tune_mode.value)
8715        if obj.origin is not None:
8716            Writer.write_string(writer, 'origin', obj.origin)
8717        if obj.os is not None:
8718            OperatingSystemWriter.write_one(obj.os, writer, 'os')
8719        if obj.payloads is not None:
8720            PayloadWriter.write_many(obj.payloads, writer, 'payload', 'payloads')
8721        if obj.persist_memorystate is not None:
8722            Writer.write_boolean(writer, 'persist_memorystate', obj.persist_memorystate)
8723        if obj.placement_policy is not None:
8724            VmPlacementPolicyWriter.write_one(obj.placement_policy, writer, 'placement_policy')
8725        if obj.rng_device is not None:
8726            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
8727        if obj.run_once is not None:
8728            Writer.write_boolean(writer, 'run_once', obj.run_once)
8729        if obj.serial_number is not None:
8730            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
8731        if obj.small_icon is not None:
8732            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
8733        if obj.snapshot_status is not None:
8734            Writer.write_string(writer, 'snapshot_status', obj.snapshot_status.value)
8735        if obj.snapshot_type is not None:
8736            Writer.write_string(writer, 'snapshot_type', obj.snapshot_type.value)
8737        if obj.soundcard_enabled is not None:
8738            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
8739        if obj.sso is not None:
8740            SsoWriter.write_one(obj.sso, writer, 'sso')
8741        if obj.start_paused is not None:
8742            Writer.write_boolean(writer, 'start_paused', obj.start_paused)
8743        if obj.start_time is not None:
8744            Writer.write_date(writer, 'start_time', obj.start_time)
8745        if obj.stateless is not None:
8746            Writer.write_boolean(writer, 'stateless', obj.stateless)
8747        if obj.status is not None:
8748            Writer.write_string(writer, 'status', obj.status.value)
8749        if obj.status_detail is not None:
8750            Writer.write_string(writer, 'status_detail', obj.status_detail)
8751        if obj.stop_reason is not None:
8752            Writer.write_string(writer, 'stop_reason', obj.stop_reason)
8753        if obj.stop_time is not None:
8754            Writer.write_date(writer, 'stop_time', obj.stop_time)
8755        if obj.storage_error_resume_behaviour is not None:
8756            Writer.write_string(writer, 'storage_error_resume_behaviour', obj.storage_error_resume_behaviour.value)
8757        if obj.time_zone is not None:
8758            TimeZoneWriter.write_one(obj.time_zone, writer, 'time_zone')
8759        if obj.tpm_enabled is not None:
8760            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
8761        if obj.tunnel_migration is not None:
8762            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
8763        if obj.type is not None:
8764            Writer.write_string(writer, 'type', obj.type.value)
8765        if obj.usb is not None:
8766            UsbWriter.write_one(obj.usb, writer, 'usb')
8767        if obj.use_latest_template_version is not None:
8768            Writer.write_boolean(writer, 'use_latest_template_version', obj.use_latest_template_version)
8769        if obj.virtio_scsi is not None:
8770            VirtioScsiWriter.write_one(obj.virtio_scsi, writer, 'virtio_scsi')
8771        if obj.virtio_scsi_multi_queues is not None:
8772            Writer.write_integer(writer, 'virtio_scsi_multi_queues', obj.virtio_scsi_multi_queues)
8773        if obj.virtio_scsi_multi_queues_enabled is not None:
8774            Writer.write_boolean(writer, 'virtio_scsi_multi_queues_enabled', obj.virtio_scsi_multi_queues_enabled)
8775        if obj.affinity_labels is not None:
8776            AffinityLabelWriter.write_many(obj.affinity_labels, writer, 'affinity_label', 'affinity_labels')
8777        if obj.applications is not None:
8778            ApplicationWriter.write_many(obj.applications, writer, 'application', 'applications')
8779        if obj.cdroms is not None:
8780            CdromWriter.write_many(obj.cdroms, writer, 'cdrom', 'cdroms')
8781        if obj.cluster is not None:
8782            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
8783        if obj.cpu_profile is not None:
8784            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
8785        if obj.disk_attachments is not None:
8786            DiskAttachmentWriter.write_many(obj.disk_attachments, writer, 'disk_attachment', 'disk_attachments')
8787        if obj.disks is not None:
8788            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
8789        if obj.dynamic_cpu is not None:
8790            DynamicCpuWriter.write_one(obj.dynamic_cpu, writer, 'dynamic_cpu')
8791        if obj.external_host_provider is not None:
8792            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
8793        if obj.floppies is not None:
8794            FloppyWriter.write_many(obj.floppies, writer, 'floppy', 'floppies')
8795        if obj.graphics_consoles is not None:
8796            GraphicsConsoleWriter.write_many(obj.graphics_consoles, writer, 'graphics_console', 'graphics_consoles')
8797        if obj.host is not None:
8798            HostWriter.write_one(obj.host, writer, 'host')
8799        if obj.host_devices is not None:
8800            HostDeviceWriter.write_many(obj.host_devices, writer, 'host_device', 'host_devices')
8801        if obj.instance_type is not None:
8802            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
8803        if obj.katello_errata is not None:
8804            KatelloErratumWriter.write_many(obj.katello_errata, writer, 'katello_erratum', 'katello_errata')
8805        if obj.mediated_devices is not None:
8806            VmMediatedDeviceWriter.write_many(obj.mediated_devices, writer, 'vm_mediated_device', 'mediated_devices')
8807        if obj.nics is not None:
8808            NicWriter.write_many(obj.nics, writer, 'nic', 'nics')
8809        if obj.numa_nodes is not None:
8810            NumaNodeWriter.write_many(obj.numa_nodes, writer, 'host_numa_node', 'host_numa_nodes')
8811        if obj.original_template is not None:
8812            TemplateWriter.write_one(obj.original_template, writer, 'original_template')
8813        if obj.permissions is not None:
8814            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
8815        if obj.quota is not None:
8816            QuotaWriter.write_one(obj.quota, writer, 'quota')
8817        if obj.reported_devices is not None:
8818            ReportedDeviceWriter.write_many(obj.reported_devices, writer, 'reported_device', 'reported_devices')
8819        if obj.sessions is not None:
8820            SessionWriter.write_many(obj.sessions, writer, 'session', 'sessions')
8821        if obj.snapshots is not None:
8822            SnapshotWriter.write_many(obj.snapshots, writer, 'snapshot', 'snapshots')
8823        if obj.statistics is not None:
8824            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
8825        if obj.storage_domain is not None:
8826            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
8827        if obj.tags is not None:
8828            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
8829        if obj.template is not None:
8830            TemplateWriter.write_one(obj.template, writer, 'template')
8831        if obj.vm is not None:
8832            VmWriter.write_one(obj.vm, writer, 'vm')
8833        if obj.vm_pool is not None:
8834            VmPoolWriter.write_one(obj.vm_pool, writer, 'vm_pool')
8835        if obj.watchdogs is not None:
8836            WatchdogWriter.write_many(obj.watchdogs, writer, 'watchdog', 'watchdogs')
8837        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8839    @staticmethod
8840    def write_many(objs, writer, singular=None, plural=None):
8841        if singular is None:
8842            singular = 'snapshot'
8843        if plural is None:
8844            plural = 'snapshots'
8845        writer.write_start(plural)
8846        if type(objs) == List:
8847            href = objs.href
8848            if href is not None:
8849                writer.write_attribute('href', href)
8850        for obj in objs:
8851            SnapshotWriter.write_one(obj, writer, singular)
8852        writer.write_end()
class SpecialObjectsWriter(ovirtsdk4.writer.Writer):
8855class SpecialObjectsWriter(Writer):
8856
8857    def __init__(self):
8858        super(SpecialObjectsWriter, self).__init__()
8859
8860    @staticmethod
8861    def write_one(obj, writer, singular=None):
8862        if singular is None:
8863            singular = 'special_objects'
8864        writer.write_start(singular)
8865        href = obj.href
8866        if href is not None:
8867            writer.write_attribute('href', href)
8868        if obj.blank_template is not None:
8869            TemplateWriter.write_one(obj.blank_template, writer, 'blank_template')
8870        if obj.root_tag is not None:
8871            TagWriter.write_one(obj.root_tag, writer, 'root_tag')
8872        writer.write_end()
8873
8874    @staticmethod
8875    def write_many(objs, writer, singular=None, plural=None):
8876        if singular is None:
8877            singular = 'special_objects'
8878        if plural is None:
8879            plural = 'special_objectss'
8880        writer.write_start(plural)
8881        if type(objs) == List:
8882            href = objs.href
8883            if href is not None:
8884                writer.write_attribute('href', href)
8885        for obj in objs:
8886            SpecialObjectsWriter.write_one(obj, writer, singular)
8887        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

SpecialObjectsWriter()
8857    def __init__(self):
8858        super(SpecialObjectsWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8860    @staticmethod
8861    def write_one(obj, writer, singular=None):
8862        if singular is None:
8863            singular = 'special_objects'
8864        writer.write_start(singular)
8865        href = obj.href
8866        if href is not None:
8867            writer.write_attribute('href', href)
8868        if obj.blank_template is not None:
8869            TemplateWriter.write_one(obj.blank_template, writer, 'blank_template')
8870        if obj.root_tag is not None:
8871            TagWriter.write_one(obj.root_tag, writer, 'root_tag')
8872        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8874    @staticmethod
8875    def write_many(objs, writer, singular=None, plural=None):
8876        if singular is None:
8877            singular = 'special_objects'
8878        if plural is None:
8879            plural = 'special_objectss'
8880        writer.write_start(plural)
8881        if type(objs) == List:
8882            href = objs.href
8883            if href is not None:
8884                writer.write_attribute('href', href)
8885        for obj in objs:
8886            SpecialObjectsWriter.write_one(obj, writer, singular)
8887        writer.write_end()
class SpmWriter(ovirtsdk4.writer.Writer):
8890class SpmWriter(Writer):
8891
8892    def __init__(self):
8893        super(SpmWriter, self).__init__()
8894
8895    @staticmethod
8896    def write_one(obj, writer, singular=None):
8897        if singular is None:
8898            singular = 'spm'
8899        writer.write_start(singular)
8900        href = obj.href
8901        if href is not None:
8902            writer.write_attribute('href', href)
8903        if obj.priority is not None:
8904            Writer.write_integer(writer, 'priority', obj.priority)
8905        if obj.status is not None:
8906            Writer.write_string(writer, 'status', obj.status.value)
8907        writer.write_end()
8908
8909    @staticmethod
8910    def write_many(objs, writer, singular=None, plural=None):
8911        if singular is None:
8912            singular = 'spm'
8913        if plural is None:
8914            plural = 'spms'
8915        writer.write_start(plural)
8916        if type(objs) == List:
8917            href = objs.href
8918            if href is not None:
8919                writer.write_attribute('href', href)
8920        for obj in objs:
8921            SpmWriter.write_one(obj, writer, singular)
8922        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

SpmWriter()
8892    def __init__(self):
8893        super(SpmWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8895    @staticmethod
8896    def write_one(obj, writer, singular=None):
8897        if singular is None:
8898            singular = 'spm'
8899        writer.write_start(singular)
8900        href = obj.href
8901        if href is not None:
8902            writer.write_attribute('href', href)
8903        if obj.priority is not None:
8904            Writer.write_integer(writer, 'priority', obj.priority)
8905        if obj.status is not None:
8906            Writer.write_string(writer, 'status', obj.status.value)
8907        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8909    @staticmethod
8910    def write_many(objs, writer, singular=None, plural=None):
8911        if singular is None:
8912            singular = 'spm'
8913        if plural is None:
8914            plural = 'spms'
8915        writer.write_start(plural)
8916        if type(objs) == List:
8917            href = objs.href
8918            if href is not None:
8919                writer.write_attribute('href', href)
8920        for obj in objs:
8921            SpmWriter.write_one(obj, writer, singular)
8922        writer.write_end()
class SshWriter(ovirtsdk4.writer.Writer):
8925class SshWriter(Writer):
8926
8927    def __init__(self):
8928        super(SshWriter, self).__init__()
8929
8930    @staticmethod
8931    def write_one(obj, writer, singular=None):
8932        if singular is None:
8933            singular = 'ssh'
8934        writer.write_start(singular)
8935        href = obj.href
8936        if href is not None:
8937            writer.write_attribute('href', href)
8938        if obj.id is not None:
8939            writer.write_attribute('id', obj.id)
8940        if obj.authentication_method is not None:
8941            Writer.write_string(writer, 'authentication_method', obj.authentication_method.value)
8942        if obj.comment is not None:
8943            Writer.write_string(writer, 'comment', obj.comment)
8944        if obj.description is not None:
8945            Writer.write_string(writer, 'description', obj.description)
8946        if obj.fingerprint is not None:
8947            Writer.write_string(writer, 'fingerprint', obj.fingerprint)
8948        if obj.name is not None:
8949            Writer.write_string(writer, 'name', obj.name)
8950        if obj.port is not None:
8951            Writer.write_integer(writer, 'port', obj.port)
8952        if obj.public_key is not None:
8953            Writer.write_string(writer, 'public_key', obj.public_key)
8954        if obj.user is not None:
8955            UserWriter.write_one(obj.user, writer, 'user')
8956        writer.write_end()
8957
8958    @staticmethod
8959    def write_many(objs, writer, singular=None, plural=None):
8960        if singular is None:
8961            singular = 'ssh'
8962        if plural is None:
8963            plural = 'sshs'
8964        writer.write_start(plural)
8965        if type(objs) == List:
8966            href = objs.href
8967            if href is not None:
8968                writer.write_attribute('href', href)
8969        for obj in objs:
8970            SshWriter.write_one(obj, writer, singular)
8971        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

SshWriter()
8927    def __init__(self):
8928        super(SshWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8930    @staticmethod
8931    def write_one(obj, writer, singular=None):
8932        if singular is None:
8933            singular = 'ssh'
8934        writer.write_start(singular)
8935        href = obj.href
8936        if href is not None:
8937            writer.write_attribute('href', href)
8938        if obj.id is not None:
8939            writer.write_attribute('id', obj.id)
8940        if obj.authentication_method is not None:
8941            Writer.write_string(writer, 'authentication_method', obj.authentication_method.value)
8942        if obj.comment is not None:
8943            Writer.write_string(writer, 'comment', obj.comment)
8944        if obj.description is not None:
8945            Writer.write_string(writer, 'description', obj.description)
8946        if obj.fingerprint is not None:
8947            Writer.write_string(writer, 'fingerprint', obj.fingerprint)
8948        if obj.name is not None:
8949            Writer.write_string(writer, 'name', obj.name)
8950        if obj.port is not None:
8951            Writer.write_integer(writer, 'port', obj.port)
8952        if obj.public_key is not None:
8953            Writer.write_string(writer, 'public_key', obj.public_key)
8954        if obj.user is not None:
8955            UserWriter.write_one(obj.user, writer, 'user')
8956        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
8958    @staticmethod
8959    def write_many(objs, writer, singular=None, plural=None):
8960        if singular is None:
8961            singular = 'ssh'
8962        if plural is None:
8963            plural = 'sshs'
8964        writer.write_start(plural)
8965        if type(objs) == List:
8966            href = objs.href
8967            if href is not None:
8968                writer.write_attribute('href', href)
8969        for obj in objs:
8970            SshWriter.write_one(obj, writer, singular)
8971        writer.write_end()
class SshPublicKeyWriter(ovirtsdk4.writer.Writer):
8974class SshPublicKeyWriter(Writer):
8975
8976    def __init__(self):
8977        super(SshPublicKeyWriter, self).__init__()
8978
8979    @staticmethod
8980    def write_one(obj, writer, singular=None):
8981        if singular is None:
8982            singular = 'ssh_public_key'
8983        writer.write_start(singular)
8984        href = obj.href
8985        if href is not None:
8986            writer.write_attribute('href', href)
8987        if obj.id is not None:
8988            writer.write_attribute('id', obj.id)
8989        if obj.comment is not None:
8990            Writer.write_string(writer, 'comment', obj.comment)
8991        if obj.content is not None:
8992            Writer.write_string(writer, 'content', obj.content)
8993        if obj.description is not None:
8994            Writer.write_string(writer, 'description', obj.description)
8995        if obj.name is not None:
8996            Writer.write_string(writer, 'name', obj.name)
8997        if obj.user is not None:
8998            UserWriter.write_one(obj.user, writer, 'user')
8999        writer.write_end()
9000
9001    @staticmethod
9002    def write_many(objs, writer, singular=None, plural=None):
9003        if singular is None:
9004            singular = 'ssh_public_key'
9005        if plural is None:
9006            plural = 'ssh_public_keys'
9007        writer.write_start(plural)
9008        if type(objs) == List:
9009            href = objs.href
9010            if href is not None:
9011                writer.write_attribute('href', href)
9012        for obj in objs:
9013            SshPublicKeyWriter.write_one(obj, writer, singular)
9014        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

SshPublicKeyWriter()
8976    def __init__(self):
8977        super(SshPublicKeyWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
8979    @staticmethod
8980    def write_one(obj, writer, singular=None):
8981        if singular is None:
8982            singular = 'ssh_public_key'
8983        writer.write_start(singular)
8984        href = obj.href
8985        if href is not None:
8986            writer.write_attribute('href', href)
8987        if obj.id is not None:
8988            writer.write_attribute('id', obj.id)
8989        if obj.comment is not None:
8990            Writer.write_string(writer, 'comment', obj.comment)
8991        if obj.content is not None:
8992            Writer.write_string(writer, 'content', obj.content)
8993        if obj.description is not None:
8994            Writer.write_string(writer, 'description', obj.description)
8995        if obj.name is not None:
8996            Writer.write_string(writer, 'name', obj.name)
8997        if obj.user is not None:
8998            UserWriter.write_one(obj.user, writer, 'user')
8999        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9001    @staticmethod
9002    def write_many(objs, writer, singular=None, plural=None):
9003        if singular is None:
9004            singular = 'ssh_public_key'
9005        if plural is None:
9006            plural = 'ssh_public_keys'
9007        writer.write_start(plural)
9008        if type(objs) == List:
9009            href = objs.href
9010            if href is not None:
9011                writer.write_attribute('href', href)
9012        for obj in objs:
9013            SshPublicKeyWriter.write_one(obj, writer, singular)
9014        writer.write_end()
class SsoWriter(ovirtsdk4.writer.Writer):
9017class SsoWriter(Writer):
9018
9019    def __init__(self):
9020        super(SsoWriter, self).__init__()
9021
9022    @staticmethod
9023    def write_one(obj, writer, singular=None):
9024        if singular is None:
9025            singular = 'sso'
9026        writer.write_start(singular)
9027        href = obj.href
9028        if href is not None:
9029            writer.write_attribute('href', href)
9030        if obj.methods is not None:
9031            MethodWriter.write_many(obj.methods, writer, 'method', 'methods')
9032        writer.write_end()
9033
9034    @staticmethod
9035    def write_many(objs, writer, singular=None, plural=None):
9036        if singular is None:
9037            singular = 'sso'
9038        if plural is None:
9039            plural = 'ssos'
9040        writer.write_start(plural)
9041        if type(objs) == List:
9042            href = objs.href
9043            if href is not None:
9044                writer.write_attribute('href', href)
9045        for obj in objs:
9046            SsoWriter.write_one(obj, writer, singular)
9047        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

SsoWriter()
9019    def __init__(self):
9020        super(SsoWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9022    @staticmethod
9023    def write_one(obj, writer, singular=None):
9024        if singular is None:
9025            singular = 'sso'
9026        writer.write_start(singular)
9027        href = obj.href
9028        if href is not None:
9029            writer.write_attribute('href', href)
9030        if obj.methods is not None:
9031            MethodWriter.write_many(obj.methods, writer, 'method', 'methods')
9032        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9034    @staticmethod
9035    def write_many(objs, writer, singular=None, plural=None):
9036        if singular is None:
9037            singular = 'sso'
9038        if plural is None:
9039            plural = 'ssos'
9040        writer.write_start(plural)
9041        if type(objs) == List:
9042            href = objs.href
9043            if href is not None:
9044                writer.write_attribute('href', href)
9045        for obj in objs:
9046            SsoWriter.write_one(obj, writer, singular)
9047        writer.write_end()
class StatisticWriter(ovirtsdk4.writer.Writer):
9050class StatisticWriter(Writer):
9051
9052    def __init__(self):
9053        super(StatisticWriter, self).__init__()
9054
9055    @staticmethod
9056    def write_one(obj, writer, singular=None):
9057        if singular is None:
9058            singular = 'statistic'
9059        writer.write_start(singular)
9060        href = obj.href
9061        if href is not None:
9062            writer.write_attribute('href', href)
9063        if obj.id is not None:
9064            writer.write_attribute('id', obj.id)
9065        if obj.comment is not None:
9066            Writer.write_string(writer, 'comment', obj.comment)
9067        if obj.description is not None:
9068            Writer.write_string(writer, 'description', obj.description)
9069        if obj.kind is not None:
9070            Writer.write_string(writer, 'kind', obj.kind.value)
9071        if obj.name is not None:
9072            Writer.write_string(writer, 'name', obj.name)
9073        if obj.type is not None:
9074            Writer.write_string(writer, 'type', obj.type.value)
9075        if obj.unit is not None:
9076            Writer.write_string(writer, 'unit', obj.unit.value)
9077        if obj.values is not None:
9078            ValueWriter.write_many(obj.values, writer, 'value', 'values')
9079        if obj.brick is not None:
9080            GlusterBrickWriter.write_one(obj.brick, writer, 'brick')
9081        if obj.disk is not None:
9082            DiskWriter.write_one(obj.disk, writer, 'disk')
9083        if obj.gluster_volume is not None:
9084            GlusterVolumeWriter.write_one(obj.gluster_volume, writer, 'gluster_volume')
9085        if obj.host is not None:
9086            HostWriter.write_one(obj.host, writer, 'host')
9087        if obj.host_nic is not None:
9088            HostNicWriter.write_one(obj.host_nic, writer, 'host_nic')
9089        if obj.host_numa_node is not None:
9090            NumaNodeWriter.write_one(obj.host_numa_node, writer, 'host_numa_node')
9091        if obj.nic is not None:
9092            NicWriter.write_one(obj.nic, writer, 'nic')
9093        if obj.step is not None:
9094            StepWriter.write_one(obj.step, writer, 'step')
9095        if obj.vm is not None:
9096            VmWriter.write_one(obj.vm, writer, 'vm')
9097        writer.write_end()
9098
9099    @staticmethod
9100    def write_many(objs, writer, singular=None, plural=None):
9101        if singular is None:
9102            singular = 'statistic'
9103        if plural is None:
9104            plural = 'statistics'
9105        writer.write_start(plural)
9106        if type(objs) == List:
9107            href = objs.href
9108            if href is not None:
9109                writer.write_attribute('href', href)
9110        for obj in objs:
9111            StatisticWriter.write_one(obj, writer, singular)
9112        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

StatisticWriter()
9052    def __init__(self):
9053        super(StatisticWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9055    @staticmethod
9056    def write_one(obj, writer, singular=None):
9057        if singular is None:
9058            singular = 'statistic'
9059        writer.write_start(singular)
9060        href = obj.href
9061        if href is not None:
9062            writer.write_attribute('href', href)
9063        if obj.id is not None:
9064            writer.write_attribute('id', obj.id)
9065        if obj.comment is not None:
9066            Writer.write_string(writer, 'comment', obj.comment)
9067        if obj.description is not None:
9068            Writer.write_string(writer, 'description', obj.description)
9069        if obj.kind is not None:
9070            Writer.write_string(writer, 'kind', obj.kind.value)
9071        if obj.name is not None:
9072            Writer.write_string(writer, 'name', obj.name)
9073        if obj.type is not None:
9074            Writer.write_string(writer, 'type', obj.type.value)
9075        if obj.unit is not None:
9076            Writer.write_string(writer, 'unit', obj.unit.value)
9077        if obj.values is not None:
9078            ValueWriter.write_many(obj.values, writer, 'value', 'values')
9079        if obj.brick is not None:
9080            GlusterBrickWriter.write_one(obj.brick, writer, 'brick')
9081        if obj.disk is not None:
9082            DiskWriter.write_one(obj.disk, writer, 'disk')
9083        if obj.gluster_volume is not None:
9084            GlusterVolumeWriter.write_one(obj.gluster_volume, writer, 'gluster_volume')
9085        if obj.host is not None:
9086            HostWriter.write_one(obj.host, writer, 'host')
9087        if obj.host_nic is not None:
9088            HostNicWriter.write_one(obj.host_nic, writer, 'host_nic')
9089        if obj.host_numa_node is not None:
9090            NumaNodeWriter.write_one(obj.host_numa_node, writer, 'host_numa_node')
9091        if obj.nic is not None:
9092            NicWriter.write_one(obj.nic, writer, 'nic')
9093        if obj.step is not None:
9094            StepWriter.write_one(obj.step, writer, 'step')
9095        if obj.vm is not None:
9096            VmWriter.write_one(obj.vm, writer, 'vm')
9097        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9099    @staticmethod
9100    def write_many(objs, writer, singular=None, plural=None):
9101        if singular is None:
9102            singular = 'statistic'
9103        if plural is None:
9104            plural = 'statistics'
9105        writer.write_start(plural)
9106        if type(objs) == List:
9107            href = objs.href
9108            if href is not None:
9109                writer.write_attribute('href', href)
9110        for obj in objs:
9111            StatisticWriter.write_one(obj, writer, singular)
9112        writer.write_end()
class StepWriter(ovirtsdk4.writer.Writer):
9115class StepWriter(Writer):
9116
9117    def __init__(self):
9118        super(StepWriter, self).__init__()
9119
9120    @staticmethod
9121    def write_one(obj, writer, singular=None):
9122        if singular is None:
9123            singular = 'step'
9124        writer.write_start(singular)
9125        href = obj.href
9126        if href is not None:
9127            writer.write_attribute('href', href)
9128        if obj.id is not None:
9129            writer.write_attribute('id', obj.id)
9130        if obj.comment is not None:
9131            Writer.write_string(writer, 'comment', obj.comment)
9132        if obj.description is not None:
9133            Writer.write_string(writer, 'description', obj.description)
9134        if obj.end_time is not None:
9135            Writer.write_date(writer, 'end_time', obj.end_time)
9136        if obj.external is not None:
9137            Writer.write_boolean(writer, 'external', obj.external)
9138        if obj.external_type is not None:
9139            Writer.write_string(writer, 'external_type', obj.external_type.value)
9140        if obj.name is not None:
9141            Writer.write_string(writer, 'name', obj.name)
9142        if obj.number is not None:
9143            Writer.write_integer(writer, 'number', obj.number)
9144        if obj.progress is not None:
9145            Writer.write_integer(writer, 'progress', obj.progress)
9146        if obj.start_time is not None:
9147            Writer.write_date(writer, 'start_time', obj.start_time)
9148        if obj.status is not None:
9149            Writer.write_string(writer, 'status', obj.status.value)
9150        if obj.type is not None:
9151            Writer.write_string(writer, 'type', obj.type.value)
9152        if obj.execution_host is not None:
9153            HostWriter.write_one(obj.execution_host, writer, 'execution_host')
9154        if obj.job is not None:
9155            JobWriter.write_one(obj.job, writer, 'job')
9156        if obj.parent_step is not None:
9157            StepWriter.write_one(obj.parent_step, writer, 'parent_step')
9158        if obj.statistics is not None:
9159            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
9160        writer.write_end()
9161
9162    @staticmethod
9163    def write_many(objs, writer, singular=None, plural=None):
9164        if singular is None:
9165            singular = 'step'
9166        if plural is None:
9167            plural = 'steps'
9168        writer.write_start(plural)
9169        if type(objs) == List:
9170            href = objs.href
9171            if href is not None:
9172                writer.write_attribute('href', href)
9173        for obj in objs:
9174            StepWriter.write_one(obj, writer, singular)
9175        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

StepWriter()
9117    def __init__(self):
9118        super(StepWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9120    @staticmethod
9121    def write_one(obj, writer, singular=None):
9122        if singular is None:
9123            singular = 'step'
9124        writer.write_start(singular)
9125        href = obj.href
9126        if href is not None:
9127            writer.write_attribute('href', href)
9128        if obj.id is not None:
9129            writer.write_attribute('id', obj.id)
9130        if obj.comment is not None:
9131            Writer.write_string(writer, 'comment', obj.comment)
9132        if obj.description is not None:
9133            Writer.write_string(writer, 'description', obj.description)
9134        if obj.end_time is not None:
9135            Writer.write_date(writer, 'end_time', obj.end_time)
9136        if obj.external is not None:
9137            Writer.write_boolean(writer, 'external', obj.external)
9138        if obj.external_type is not None:
9139            Writer.write_string(writer, 'external_type', obj.external_type.value)
9140        if obj.name is not None:
9141            Writer.write_string(writer, 'name', obj.name)
9142        if obj.number is not None:
9143            Writer.write_integer(writer, 'number', obj.number)
9144        if obj.progress is not None:
9145            Writer.write_integer(writer, 'progress', obj.progress)
9146        if obj.start_time is not None:
9147            Writer.write_date(writer, 'start_time', obj.start_time)
9148        if obj.status is not None:
9149            Writer.write_string(writer, 'status', obj.status.value)
9150        if obj.type is not None:
9151            Writer.write_string(writer, 'type', obj.type.value)
9152        if obj.execution_host is not None:
9153            HostWriter.write_one(obj.execution_host, writer, 'execution_host')
9154        if obj.job is not None:
9155            JobWriter.write_one(obj.job, writer, 'job')
9156        if obj.parent_step is not None:
9157            StepWriter.write_one(obj.parent_step, writer, 'parent_step')
9158        if obj.statistics is not None:
9159            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
9160        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9162    @staticmethod
9163    def write_many(objs, writer, singular=None, plural=None):
9164        if singular is None:
9165            singular = 'step'
9166        if plural is None:
9167            plural = 'steps'
9168        writer.write_start(plural)
9169        if type(objs) == List:
9170            href = objs.href
9171            if href is not None:
9172                writer.write_attribute('href', href)
9173        for obj in objs:
9174            StepWriter.write_one(obj, writer, singular)
9175        writer.write_end()
class StorageConnectionWriter(ovirtsdk4.writer.Writer):
9178class StorageConnectionWriter(Writer):
9179
9180    def __init__(self):
9181        super(StorageConnectionWriter, self).__init__()
9182
9183    @staticmethod
9184    def write_one(obj, writer, singular=None):
9185        if singular is None:
9186            singular = 'storage_connection'
9187        writer.write_start(singular)
9188        href = obj.href
9189        if href is not None:
9190            writer.write_attribute('href', href)
9191        if obj.id is not None:
9192            writer.write_attribute('id', obj.id)
9193        if obj.address is not None:
9194            Writer.write_string(writer, 'address', obj.address)
9195        if obj.comment is not None:
9196            Writer.write_string(writer, 'comment', obj.comment)
9197        if obj.description is not None:
9198            Writer.write_string(writer, 'description', obj.description)
9199        if obj.mount_options is not None:
9200            Writer.write_string(writer, 'mount_options', obj.mount_options)
9201        if obj.name is not None:
9202            Writer.write_string(writer, 'name', obj.name)
9203        if obj.nfs_retrans is not None:
9204            Writer.write_integer(writer, 'nfs_retrans', obj.nfs_retrans)
9205        if obj.nfs_timeo is not None:
9206            Writer.write_integer(writer, 'nfs_timeo', obj.nfs_timeo)
9207        if obj.nfs_version is not None:
9208            Writer.write_string(writer, 'nfs_version', obj.nfs_version.value)
9209        if obj.password is not None:
9210            Writer.write_string(writer, 'password', obj.password)
9211        if obj.path is not None:
9212            Writer.write_string(writer, 'path', obj.path)
9213        if obj.port is not None:
9214            Writer.write_integer(writer, 'port', obj.port)
9215        if obj.portal is not None:
9216            Writer.write_string(writer, 'portal', obj.portal)
9217        if obj.target is not None:
9218            Writer.write_string(writer, 'target', obj.target)
9219        if obj.type is not None:
9220            Writer.write_string(writer, 'type', obj.type.value)
9221        if obj.username is not None:
9222            Writer.write_string(writer, 'username', obj.username)
9223        if obj.vfs_type is not None:
9224            Writer.write_string(writer, 'vfs_type', obj.vfs_type)
9225        if obj.gluster_volume is not None:
9226            GlusterVolumeWriter.write_one(obj.gluster_volume, writer, 'gluster_volume')
9227        if obj.host is not None:
9228            HostWriter.write_one(obj.host, writer, 'host')
9229        writer.write_end()
9230
9231    @staticmethod
9232    def write_many(objs, writer, singular=None, plural=None):
9233        if singular is None:
9234            singular = 'storage_connection'
9235        if plural is None:
9236            plural = 'storage_connections'
9237        writer.write_start(plural)
9238        if type(objs) == List:
9239            href = objs.href
9240            if href is not None:
9241                writer.write_attribute('href', href)
9242        for obj in objs:
9243            StorageConnectionWriter.write_one(obj, writer, singular)
9244        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

StorageConnectionWriter()
9180    def __init__(self):
9181        super(StorageConnectionWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9183    @staticmethod
9184    def write_one(obj, writer, singular=None):
9185        if singular is None:
9186            singular = 'storage_connection'
9187        writer.write_start(singular)
9188        href = obj.href
9189        if href is not None:
9190            writer.write_attribute('href', href)
9191        if obj.id is not None:
9192            writer.write_attribute('id', obj.id)
9193        if obj.address is not None:
9194            Writer.write_string(writer, 'address', obj.address)
9195        if obj.comment is not None:
9196            Writer.write_string(writer, 'comment', obj.comment)
9197        if obj.description is not None:
9198            Writer.write_string(writer, 'description', obj.description)
9199        if obj.mount_options is not None:
9200            Writer.write_string(writer, 'mount_options', obj.mount_options)
9201        if obj.name is not None:
9202            Writer.write_string(writer, 'name', obj.name)
9203        if obj.nfs_retrans is not None:
9204            Writer.write_integer(writer, 'nfs_retrans', obj.nfs_retrans)
9205        if obj.nfs_timeo is not None:
9206            Writer.write_integer(writer, 'nfs_timeo', obj.nfs_timeo)
9207        if obj.nfs_version is not None:
9208            Writer.write_string(writer, 'nfs_version', obj.nfs_version.value)
9209        if obj.password is not None:
9210            Writer.write_string(writer, 'password', obj.password)
9211        if obj.path is not None:
9212            Writer.write_string(writer, 'path', obj.path)
9213        if obj.port is not None:
9214            Writer.write_integer(writer, 'port', obj.port)
9215        if obj.portal is not None:
9216            Writer.write_string(writer, 'portal', obj.portal)
9217        if obj.target is not None:
9218            Writer.write_string(writer, 'target', obj.target)
9219        if obj.type is not None:
9220            Writer.write_string(writer, 'type', obj.type.value)
9221        if obj.username is not None:
9222            Writer.write_string(writer, 'username', obj.username)
9223        if obj.vfs_type is not None:
9224            Writer.write_string(writer, 'vfs_type', obj.vfs_type)
9225        if obj.gluster_volume is not None:
9226            GlusterVolumeWriter.write_one(obj.gluster_volume, writer, 'gluster_volume')
9227        if obj.host is not None:
9228            HostWriter.write_one(obj.host, writer, 'host')
9229        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9231    @staticmethod
9232    def write_many(objs, writer, singular=None, plural=None):
9233        if singular is None:
9234            singular = 'storage_connection'
9235        if plural is None:
9236            plural = 'storage_connections'
9237        writer.write_start(plural)
9238        if type(objs) == List:
9239            href = objs.href
9240            if href is not None:
9241                writer.write_attribute('href', href)
9242        for obj in objs:
9243            StorageConnectionWriter.write_one(obj, writer, singular)
9244        writer.write_end()
class StorageConnectionExtensionWriter(ovirtsdk4.writer.Writer):
9247class StorageConnectionExtensionWriter(Writer):
9248
9249    def __init__(self):
9250        super(StorageConnectionExtensionWriter, self).__init__()
9251
9252    @staticmethod
9253    def write_one(obj, writer, singular=None):
9254        if singular is None:
9255            singular = 'storage_connection_extension'
9256        writer.write_start(singular)
9257        href = obj.href
9258        if href is not None:
9259            writer.write_attribute('href', href)
9260        if obj.id is not None:
9261            writer.write_attribute('id', obj.id)
9262        if obj.comment is not None:
9263            Writer.write_string(writer, 'comment', obj.comment)
9264        if obj.description is not None:
9265            Writer.write_string(writer, 'description', obj.description)
9266        if obj.name is not None:
9267            Writer.write_string(writer, 'name', obj.name)
9268        if obj.password is not None:
9269            Writer.write_string(writer, 'password', obj.password)
9270        if obj.target is not None:
9271            Writer.write_string(writer, 'target', obj.target)
9272        if obj.username is not None:
9273            Writer.write_string(writer, 'username', obj.username)
9274        if obj.host is not None:
9275            HostWriter.write_one(obj.host, writer, 'host')
9276        writer.write_end()
9277
9278    @staticmethod
9279    def write_many(objs, writer, singular=None, plural=None):
9280        if singular is None:
9281            singular = 'storage_connection_extension'
9282        if plural is None:
9283            plural = 'storage_connection_extensions'
9284        writer.write_start(plural)
9285        if type(objs) == List:
9286            href = objs.href
9287            if href is not None:
9288                writer.write_attribute('href', href)
9289        for obj in objs:
9290            StorageConnectionExtensionWriter.write_one(obj, writer, singular)
9291        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

StorageConnectionExtensionWriter()
9249    def __init__(self):
9250        super(StorageConnectionExtensionWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9252    @staticmethod
9253    def write_one(obj, writer, singular=None):
9254        if singular is None:
9255            singular = 'storage_connection_extension'
9256        writer.write_start(singular)
9257        href = obj.href
9258        if href is not None:
9259            writer.write_attribute('href', href)
9260        if obj.id is not None:
9261            writer.write_attribute('id', obj.id)
9262        if obj.comment is not None:
9263            Writer.write_string(writer, 'comment', obj.comment)
9264        if obj.description is not None:
9265            Writer.write_string(writer, 'description', obj.description)
9266        if obj.name is not None:
9267            Writer.write_string(writer, 'name', obj.name)
9268        if obj.password is not None:
9269            Writer.write_string(writer, 'password', obj.password)
9270        if obj.target is not None:
9271            Writer.write_string(writer, 'target', obj.target)
9272        if obj.username is not None:
9273            Writer.write_string(writer, 'username', obj.username)
9274        if obj.host is not None:
9275            HostWriter.write_one(obj.host, writer, 'host')
9276        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9278    @staticmethod
9279    def write_many(objs, writer, singular=None, plural=None):
9280        if singular is None:
9281            singular = 'storage_connection_extension'
9282        if plural is None:
9283            plural = 'storage_connection_extensions'
9284        writer.write_start(plural)
9285        if type(objs) == List:
9286            href = objs.href
9287            if href is not None:
9288                writer.write_attribute('href', href)
9289        for obj in objs:
9290            StorageConnectionExtensionWriter.write_one(obj, writer, singular)
9291        writer.write_end()
class StorageDomainWriter(ovirtsdk4.writer.Writer):
9294class StorageDomainWriter(Writer):
9295
9296    def __init__(self):
9297        super(StorageDomainWriter, self).__init__()
9298
9299    @staticmethod
9300    def write_one(obj, writer, singular=None):
9301        if singular is None:
9302            singular = 'storage_domain'
9303        writer.write_start(singular)
9304        href = obj.href
9305        if href is not None:
9306            writer.write_attribute('href', href)
9307        if obj.id is not None:
9308            writer.write_attribute('id', obj.id)
9309        if obj.available is not None:
9310            Writer.write_integer(writer, 'available', obj.available)
9311        if obj.backup is not None:
9312            Writer.write_boolean(writer, 'backup', obj.backup)
9313        if obj.block_size is not None:
9314            Writer.write_integer(writer, 'block_size', obj.block_size)
9315        if obj.comment is not None:
9316            Writer.write_string(writer, 'comment', obj.comment)
9317        if obj.committed is not None:
9318            Writer.write_integer(writer, 'committed', obj.committed)
9319        if obj.critical_space_action_blocker is not None:
9320            Writer.write_integer(writer, 'critical_space_action_blocker', obj.critical_space_action_blocker)
9321        if obj.description is not None:
9322            Writer.write_string(writer, 'description', obj.description)
9323        if obj.discard_after_delete is not None:
9324            Writer.write_boolean(writer, 'discard_after_delete', obj.discard_after_delete)
9325        if obj.external_status is not None:
9326            Writer.write_string(writer, 'external_status', obj.external_status.value)
9327        if obj.import_ is not None:
9328            Writer.write_boolean(writer, 'import', obj.import_)
9329        if obj.master is not None:
9330            Writer.write_boolean(writer, 'master', obj.master)
9331        if obj.name is not None:
9332            Writer.write_string(writer, 'name', obj.name)
9333        if obj.status is not None:
9334            Writer.write_string(writer, 'status', obj.status.value)
9335        if obj.storage is not None:
9336            HostStorageWriter.write_one(obj.storage, writer, 'storage')
9337        if obj.storage_format is not None:
9338            Writer.write_string(writer, 'storage_format', obj.storage_format.value)
9339        if obj.supports_discard is not None:
9340            Writer.write_boolean(writer, 'supports_discard', obj.supports_discard)
9341        if obj.supports_discard_zeroes_data is not None:
9342            Writer.write_boolean(writer, 'supports_discard_zeroes_data', obj.supports_discard_zeroes_data)
9343        if obj.type is not None:
9344            Writer.write_string(writer, 'type', obj.type.value)
9345        if obj.used is not None:
9346            Writer.write_integer(writer, 'used', obj.used)
9347        if obj.warning_low_space_indicator is not None:
9348            Writer.write_integer(writer, 'warning_low_space_indicator', obj.warning_low_space_indicator)
9349        if obj.wipe_after_delete is not None:
9350            Writer.write_boolean(writer, 'wipe_after_delete', obj.wipe_after_delete)
9351        if obj.data_center is not None:
9352            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
9353        if obj.data_centers is not None:
9354            DataCenterWriter.write_many(obj.data_centers, writer, 'data_center', 'data_centers')
9355        if obj.disk_profiles is not None:
9356            DiskProfileWriter.write_many(obj.disk_profiles, writer, 'disk_profile', 'disk_profiles')
9357        if obj.disk_snapshots is not None:
9358            DiskSnapshotWriter.write_many(obj.disk_snapshots, writer, 'disk_snapshot', 'disk_snapshots')
9359        if obj.disks is not None:
9360            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
9361        if obj.files is not None:
9362            FileWriter.write_many(obj.files, writer, 'file', 'files')
9363        if obj.host is not None:
9364            HostWriter.write_one(obj.host, writer, 'host')
9365        if obj.images is not None:
9366            ImageWriter.write_many(obj.images, writer, 'image', 'images')
9367        if obj.permissions is not None:
9368            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
9369        if obj.storage_connections is not None:
9370            StorageConnectionWriter.write_many(obj.storage_connections, writer, 'storage_connection', 'storage_connections')
9371        if obj.templates is not None:
9372            TemplateWriter.write_many(obj.templates, writer, 'template', 'templates')
9373        if obj.vms is not None:
9374            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
9375        writer.write_end()
9376
9377    @staticmethod
9378    def write_many(objs, writer, singular=None, plural=None):
9379        if singular is None:
9380            singular = 'storage_domain'
9381        if plural is None:
9382            plural = 'storage_domains'
9383        writer.write_start(plural)
9384        if type(objs) == List:
9385            href = objs.href
9386            if href is not None:
9387                writer.write_attribute('href', href)
9388        for obj in objs:
9389            StorageDomainWriter.write_one(obj, writer, singular)
9390        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

StorageDomainWriter()
9296    def __init__(self):
9297        super(StorageDomainWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9299    @staticmethod
9300    def write_one(obj, writer, singular=None):
9301        if singular is None:
9302            singular = 'storage_domain'
9303        writer.write_start(singular)
9304        href = obj.href
9305        if href is not None:
9306            writer.write_attribute('href', href)
9307        if obj.id is not None:
9308            writer.write_attribute('id', obj.id)
9309        if obj.available is not None:
9310            Writer.write_integer(writer, 'available', obj.available)
9311        if obj.backup is not None:
9312            Writer.write_boolean(writer, 'backup', obj.backup)
9313        if obj.block_size is not None:
9314            Writer.write_integer(writer, 'block_size', obj.block_size)
9315        if obj.comment is not None:
9316            Writer.write_string(writer, 'comment', obj.comment)
9317        if obj.committed is not None:
9318            Writer.write_integer(writer, 'committed', obj.committed)
9319        if obj.critical_space_action_blocker is not None:
9320            Writer.write_integer(writer, 'critical_space_action_blocker', obj.critical_space_action_blocker)
9321        if obj.description is not None:
9322            Writer.write_string(writer, 'description', obj.description)
9323        if obj.discard_after_delete is not None:
9324            Writer.write_boolean(writer, 'discard_after_delete', obj.discard_after_delete)
9325        if obj.external_status is not None:
9326            Writer.write_string(writer, 'external_status', obj.external_status.value)
9327        if obj.import_ is not None:
9328            Writer.write_boolean(writer, 'import', obj.import_)
9329        if obj.master is not None:
9330            Writer.write_boolean(writer, 'master', obj.master)
9331        if obj.name is not None:
9332            Writer.write_string(writer, 'name', obj.name)
9333        if obj.status is not None:
9334            Writer.write_string(writer, 'status', obj.status.value)
9335        if obj.storage is not None:
9336            HostStorageWriter.write_one(obj.storage, writer, 'storage')
9337        if obj.storage_format is not None:
9338            Writer.write_string(writer, 'storage_format', obj.storage_format.value)
9339        if obj.supports_discard is not None:
9340            Writer.write_boolean(writer, 'supports_discard', obj.supports_discard)
9341        if obj.supports_discard_zeroes_data is not None:
9342            Writer.write_boolean(writer, 'supports_discard_zeroes_data', obj.supports_discard_zeroes_data)
9343        if obj.type is not None:
9344            Writer.write_string(writer, 'type', obj.type.value)
9345        if obj.used is not None:
9346            Writer.write_integer(writer, 'used', obj.used)
9347        if obj.warning_low_space_indicator is not None:
9348            Writer.write_integer(writer, 'warning_low_space_indicator', obj.warning_low_space_indicator)
9349        if obj.wipe_after_delete is not None:
9350            Writer.write_boolean(writer, 'wipe_after_delete', obj.wipe_after_delete)
9351        if obj.data_center is not None:
9352            DataCenterWriter.write_one(obj.data_center, writer, 'data_center')
9353        if obj.data_centers is not None:
9354            DataCenterWriter.write_many(obj.data_centers, writer, 'data_center', 'data_centers')
9355        if obj.disk_profiles is not None:
9356            DiskProfileWriter.write_many(obj.disk_profiles, writer, 'disk_profile', 'disk_profiles')
9357        if obj.disk_snapshots is not None:
9358            DiskSnapshotWriter.write_many(obj.disk_snapshots, writer, 'disk_snapshot', 'disk_snapshots')
9359        if obj.disks is not None:
9360            DiskWriter.write_many(obj.disks, writer, 'disk', 'disks')
9361        if obj.files is not None:
9362            FileWriter.write_many(obj.files, writer, 'file', 'files')
9363        if obj.host is not None:
9364            HostWriter.write_one(obj.host, writer, 'host')
9365        if obj.images is not None:
9366            ImageWriter.write_many(obj.images, writer, 'image', 'images')
9367        if obj.permissions is not None:
9368            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
9369        if obj.storage_connections is not None:
9370            StorageConnectionWriter.write_many(obj.storage_connections, writer, 'storage_connection', 'storage_connections')
9371        if obj.templates is not None:
9372            TemplateWriter.write_many(obj.templates, writer, 'template', 'templates')
9373        if obj.vms is not None:
9374            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
9375        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9377    @staticmethod
9378    def write_many(objs, writer, singular=None, plural=None):
9379        if singular is None:
9380            singular = 'storage_domain'
9381        if plural is None:
9382            plural = 'storage_domains'
9383        writer.write_start(plural)
9384        if type(objs) == List:
9385            href = objs.href
9386            if href is not None:
9387                writer.write_attribute('href', href)
9388        for obj in objs:
9389            StorageDomainWriter.write_one(obj, writer, singular)
9390        writer.write_end()
class StorageDomainLeaseWriter(ovirtsdk4.writer.Writer):
9393class StorageDomainLeaseWriter(Writer):
9394
9395    def __init__(self):
9396        super(StorageDomainLeaseWriter, self).__init__()
9397
9398    @staticmethod
9399    def write_one(obj, writer, singular=None):
9400        if singular is None:
9401            singular = 'storage_domain_lease'
9402        writer.write_start(singular)
9403        href = obj.href
9404        if href is not None:
9405            writer.write_attribute('href', href)
9406        if obj.storage_domain is not None:
9407            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
9408        writer.write_end()
9409
9410    @staticmethod
9411    def write_many(objs, writer, singular=None, plural=None):
9412        if singular is None:
9413            singular = 'storage_domain_lease'
9414        if plural is None:
9415            plural = 'storage_domain_leases'
9416        writer.write_start(plural)
9417        if type(objs) == List:
9418            href = objs.href
9419            if href is not None:
9420                writer.write_attribute('href', href)
9421        for obj in objs:
9422            StorageDomainLeaseWriter.write_one(obj, writer, singular)
9423        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

StorageDomainLeaseWriter()
9395    def __init__(self):
9396        super(StorageDomainLeaseWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9398    @staticmethod
9399    def write_one(obj, writer, singular=None):
9400        if singular is None:
9401            singular = 'storage_domain_lease'
9402        writer.write_start(singular)
9403        href = obj.href
9404        if href is not None:
9405            writer.write_attribute('href', href)
9406        if obj.storage_domain is not None:
9407            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
9408        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9410    @staticmethod
9411    def write_many(objs, writer, singular=None, plural=None):
9412        if singular is None:
9413            singular = 'storage_domain_lease'
9414        if plural is None:
9415            plural = 'storage_domain_leases'
9416        writer.write_start(plural)
9417        if type(objs) == List:
9418            href = objs.href
9419            if href is not None:
9420                writer.write_attribute('href', href)
9421        for obj in objs:
9422            StorageDomainLeaseWriter.write_one(obj, writer, singular)
9423        writer.write_end()
class SystemOptionWriter(ovirtsdk4.writer.Writer):
9426class SystemOptionWriter(Writer):
9427
9428    def __init__(self):
9429        super(SystemOptionWriter, self).__init__()
9430
9431    @staticmethod
9432    def write_one(obj, writer, singular=None):
9433        if singular is None:
9434            singular = 'system_option'
9435        writer.write_start(singular)
9436        href = obj.href
9437        if href is not None:
9438            writer.write_attribute('href', href)
9439        if obj.id is not None:
9440            writer.write_attribute('id', obj.id)
9441        if obj.comment is not None:
9442            Writer.write_string(writer, 'comment', obj.comment)
9443        if obj.description is not None:
9444            Writer.write_string(writer, 'description', obj.description)
9445        if obj.name is not None:
9446            Writer.write_string(writer, 'name', obj.name)
9447        if obj.values is not None:
9448            SystemOptionValueWriter.write_many(obj.values, writer, 'system_option_value', 'values')
9449        writer.write_end()
9450
9451    @staticmethod
9452    def write_many(objs, writer, singular=None, plural=None):
9453        if singular is None:
9454            singular = 'system_option'
9455        if plural is None:
9456            plural = 'system_options'
9457        writer.write_start(plural)
9458        if type(objs) == List:
9459            href = objs.href
9460            if href is not None:
9461                writer.write_attribute('href', href)
9462        for obj in objs:
9463            SystemOptionWriter.write_one(obj, writer, singular)
9464        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

SystemOptionWriter()
9428    def __init__(self):
9429        super(SystemOptionWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9431    @staticmethod
9432    def write_one(obj, writer, singular=None):
9433        if singular is None:
9434            singular = 'system_option'
9435        writer.write_start(singular)
9436        href = obj.href
9437        if href is not None:
9438            writer.write_attribute('href', href)
9439        if obj.id is not None:
9440            writer.write_attribute('id', obj.id)
9441        if obj.comment is not None:
9442            Writer.write_string(writer, 'comment', obj.comment)
9443        if obj.description is not None:
9444            Writer.write_string(writer, 'description', obj.description)
9445        if obj.name is not None:
9446            Writer.write_string(writer, 'name', obj.name)
9447        if obj.values is not None:
9448            SystemOptionValueWriter.write_many(obj.values, writer, 'system_option_value', 'values')
9449        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9451    @staticmethod
9452    def write_many(objs, writer, singular=None, plural=None):
9453        if singular is None:
9454            singular = 'system_option'
9455        if plural is None:
9456            plural = 'system_options'
9457        writer.write_start(plural)
9458        if type(objs) == List:
9459            href = objs.href
9460            if href is not None:
9461                writer.write_attribute('href', href)
9462        for obj in objs:
9463            SystemOptionWriter.write_one(obj, writer, singular)
9464        writer.write_end()
class SystemOptionValueWriter(ovirtsdk4.writer.Writer):
9467class SystemOptionValueWriter(Writer):
9468
9469    def __init__(self):
9470        super(SystemOptionValueWriter, self).__init__()
9471
9472    @staticmethod
9473    def write_one(obj, writer, singular=None):
9474        if singular is None:
9475            singular = 'system_option_value'
9476        writer.write_start(singular)
9477        href = obj.href
9478        if href is not None:
9479            writer.write_attribute('href', href)
9480        if obj.value is not None:
9481            Writer.write_string(writer, 'value', obj.value)
9482        if obj.version is not None:
9483            Writer.write_string(writer, 'version', obj.version)
9484        writer.write_end()
9485
9486    @staticmethod
9487    def write_many(objs, writer, singular=None, plural=None):
9488        if singular is None:
9489            singular = 'system_option_value'
9490        if plural is None:
9491            plural = 'system_option_values'
9492        writer.write_start(plural)
9493        if type(objs) == List:
9494            href = objs.href
9495            if href is not None:
9496                writer.write_attribute('href', href)
9497        for obj in objs:
9498            SystemOptionValueWriter.write_one(obj, writer, singular)
9499        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

SystemOptionValueWriter()
9469    def __init__(self):
9470        super(SystemOptionValueWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9472    @staticmethod
9473    def write_one(obj, writer, singular=None):
9474        if singular is None:
9475            singular = 'system_option_value'
9476        writer.write_start(singular)
9477        href = obj.href
9478        if href is not None:
9479            writer.write_attribute('href', href)
9480        if obj.value is not None:
9481            Writer.write_string(writer, 'value', obj.value)
9482        if obj.version is not None:
9483            Writer.write_string(writer, 'version', obj.version)
9484        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9486    @staticmethod
9487    def write_many(objs, writer, singular=None, plural=None):
9488        if singular is None:
9489            singular = 'system_option_value'
9490        if plural is None:
9491            plural = 'system_option_values'
9492        writer.write_start(plural)
9493        if type(objs) == List:
9494            href = objs.href
9495            if href is not None:
9496                writer.write_attribute('href', href)
9497        for obj in objs:
9498            SystemOptionValueWriter.write_one(obj, writer, singular)
9499        writer.write_end()
class TagWriter(ovirtsdk4.writer.Writer):
9502class TagWriter(Writer):
9503
9504    def __init__(self):
9505        super(TagWriter, self).__init__()
9506
9507    @staticmethod
9508    def write_one(obj, writer, singular=None):
9509        if singular is None:
9510            singular = 'tag'
9511        writer.write_start(singular)
9512        href = obj.href
9513        if href is not None:
9514            writer.write_attribute('href', href)
9515        if obj.id is not None:
9516            writer.write_attribute('id', obj.id)
9517        if obj.comment is not None:
9518            Writer.write_string(writer, 'comment', obj.comment)
9519        if obj.description is not None:
9520            Writer.write_string(writer, 'description', obj.description)
9521        if obj.name is not None:
9522            Writer.write_string(writer, 'name', obj.name)
9523        if obj.group is not None:
9524            GroupWriter.write_one(obj.group, writer, 'group')
9525        if obj.host is not None:
9526            HostWriter.write_one(obj.host, writer, 'host')
9527        if obj.parent is not None:
9528            TagWriter.write_one(obj.parent, writer, 'parent')
9529        if obj.template is not None:
9530            TemplateWriter.write_one(obj.template, writer, 'template')
9531        if obj.user is not None:
9532            UserWriter.write_one(obj.user, writer, 'user')
9533        if obj.vm is not None:
9534            VmWriter.write_one(obj.vm, writer, 'vm')
9535        writer.write_end()
9536
9537    @staticmethod
9538    def write_many(objs, writer, singular=None, plural=None):
9539        if singular is None:
9540            singular = 'tag'
9541        if plural is None:
9542            plural = 'tags'
9543        writer.write_start(plural)
9544        if type(objs) == List:
9545            href = objs.href
9546            if href is not None:
9547                writer.write_attribute('href', href)
9548        for obj in objs:
9549            TagWriter.write_one(obj, writer, singular)
9550        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

TagWriter()
9504    def __init__(self):
9505        super(TagWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9507    @staticmethod
9508    def write_one(obj, writer, singular=None):
9509        if singular is None:
9510            singular = 'tag'
9511        writer.write_start(singular)
9512        href = obj.href
9513        if href is not None:
9514            writer.write_attribute('href', href)
9515        if obj.id is not None:
9516            writer.write_attribute('id', obj.id)
9517        if obj.comment is not None:
9518            Writer.write_string(writer, 'comment', obj.comment)
9519        if obj.description is not None:
9520            Writer.write_string(writer, 'description', obj.description)
9521        if obj.name is not None:
9522            Writer.write_string(writer, 'name', obj.name)
9523        if obj.group is not None:
9524            GroupWriter.write_one(obj.group, writer, 'group')
9525        if obj.host is not None:
9526            HostWriter.write_one(obj.host, writer, 'host')
9527        if obj.parent is not None:
9528            TagWriter.write_one(obj.parent, writer, 'parent')
9529        if obj.template is not None:
9530            TemplateWriter.write_one(obj.template, writer, 'template')
9531        if obj.user is not None:
9532            UserWriter.write_one(obj.user, writer, 'user')
9533        if obj.vm is not None:
9534            VmWriter.write_one(obj.vm, writer, 'vm')
9535        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9537    @staticmethod
9538    def write_many(objs, writer, singular=None, plural=None):
9539        if singular is None:
9540            singular = 'tag'
9541        if plural is None:
9542            plural = 'tags'
9543        writer.write_start(plural)
9544        if type(objs) == List:
9545            href = objs.href
9546            if href is not None:
9547                writer.write_attribute('href', href)
9548        for obj in objs:
9549            TagWriter.write_one(obj, writer, singular)
9550        writer.write_end()
class TemplateWriter(ovirtsdk4.writer.Writer):
9553class TemplateWriter(Writer):
9554
9555    def __init__(self):
9556        super(TemplateWriter, self).__init__()
9557
9558    @staticmethod
9559    def write_one(obj, writer, singular=None):
9560        if singular is None:
9561            singular = 'template'
9562        writer.write_start(singular)
9563        href = obj.href
9564        if href is not None:
9565            writer.write_attribute('href', href)
9566        if obj.id is not None:
9567            writer.write_attribute('id', obj.id)
9568        if obj.auto_pinning_policy is not None:
9569            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
9570        if obj.bios is not None:
9571            BiosWriter.write_one(obj.bios, writer, 'bios')
9572        if obj.comment is not None:
9573            Writer.write_string(writer, 'comment', obj.comment)
9574        if obj.console is not None:
9575            ConsoleWriter.write_one(obj.console, writer, 'console')
9576        if obj.cpu is not None:
9577            CpuWriter.write_one(obj.cpu, writer, 'cpu')
9578        if obj.cpu_pinning_policy is not None:
9579            Writer.write_string(writer, 'cpu_pinning_policy', obj.cpu_pinning_policy.value)
9580        if obj.cpu_shares is not None:
9581            Writer.write_integer(writer, 'cpu_shares', obj.cpu_shares)
9582        if obj.creation_time is not None:
9583            Writer.write_date(writer, 'creation_time', obj.creation_time)
9584        if obj.custom_compatibility_version is not None:
9585            VersionWriter.write_one(obj.custom_compatibility_version, writer, 'custom_compatibility_version')
9586        if obj.custom_cpu_model is not None:
9587            Writer.write_string(writer, 'custom_cpu_model', obj.custom_cpu_model)
9588        if obj.custom_emulated_machine is not None:
9589            Writer.write_string(writer, 'custom_emulated_machine', obj.custom_emulated_machine)
9590        if obj.custom_properties is not None:
9591            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
9592        if obj.delete_protected is not None:
9593            Writer.write_boolean(writer, 'delete_protected', obj.delete_protected)
9594        if obj.description is not None:
9595            Writer.write_string(writer, 'description', obj.description)
9596        if obj.display is not None:
9597            DisplayWriter.write_one(obj.display, writer, 'display')
9598        if obj.domain is not None:
9599            DomainWriter.write_one(obj.domain, writer, 'domain')
9600        if obj.high_availability is not None:
9601            HighAvailabilityWriter.write_one(obj.high_availability, writer, 'high_availability')
9602        if obj.initialization is not None:
9603            InitializationWriter.write_one(obj.initialization, writer, 'initialization')
9604        if obj.io is not None:
9605            IoWriter.write_one(obj.io, writer, 'io')
9606        if obj.large_icon is not None:
9607            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
9608        if obj.lease is not None:
9609            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
9610        if obj.memory is not None:
9611            Writer.write_integer(writer, 'memory', obj.memory)
9612        if obj.memory_policy is not None:
9613            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
9614        if obj.migration is not None:
9615            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
9616        if obj.migration_downtime is not None:
9617            Writer.write_integer(writer, 'migration_downtime', obj.migration_downtime)
9618        if obj.multi_queues_enabled is not None:
9619            Writer.write_boolean(writer, 'multi_queues_enabled', obj.multi_queues_enabled)
9620        if obj.name is not None:
9621            Writer.write_string(writer, 'name', obj.name)
9622        if obj.origin is not None:
9623            Writer.write_string(writer, 'origin', obj.origin)
9624        if obj.os is not None:
9625            OperatingSystemWriter.write_one(obj.os, writer, 'os')
9626        if obj.placement_policy is not None:
9627            VmPlacementPolicyWriter.write_one(obj.placement_policy, writer, 'placement_policy')
9628        if obj.rng_device is not None:
9629            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
9630        if obj.serial_number is not None:
9631            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
9632        if obj.small_icon is not None:
9633            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
9634        if obj.soundcard_enabled is not None:
9635            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
9636        if obj.sso is not None:
9637            SsoWriter.write_one(obj.sso, writer, 'sso')
9638        if obj.start_paused is not None:
9639            Writer.write_boolean(writer, 'start_paused', obj.start_paused)
9640        if obj.stateless is not None:
9641            Writer.write_boolean(writer, 'stateless', obj.stateless)
9642        if obj.status is not None:
9643            Writer.write_string(writer, 'status', obj.status.value)
9644        if obj.storage_error_resume_behaviour is not None:
9645            Writer.write_string(writer, 'storage_error_resume_behaviour', obj.storage_error_resume_behaviour.value)
9646        if obj.time_zone is not None:
9647            TimeZoneWriter.write_one(obj.time_zone, writer, 'time_zone')
9648        if obj.tpm_enabled is not None:
9649            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
9650        if obj.tunnel_migration is not None:
9651            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
9652        if obj.type is not None:
9653            Writer.write_string(writer, 'type', obj.type.value)
9654        if obj.usb is not None:
9655            UsbWriter.write_one(obj.usb, writer, 'usb')
9656        if obj.version is not None:
9657            TemplateVersionWriter.write_one(obj.version, writer, 'version')
9658        if obj.virtio_scsi is not None:
9659            VirtioScsiWriter.write_one(obj.virtio_scsi, writer, 'virtio_scsi')
9660        if obj.virtio_scsi_multi_queues is not None:
9661            Writer.write_integer(writer, 'virtio_scsi_multi_queues', obj.virtio_scsi_multi_queues)
9662        if obj.virtio_scsi_multi_queues_enabled is not None:
9663            Writer.write_boolean(writer, 'virtio_scsi_multi_queues_enabled', obj.virtio_scsi_multi_queues_enabled)
9664        if obj.vm is not None:
9665            VmWriter.write_one(obj.vm, writer, 'vm')
9666        if obj.cdroms is not None:
9667            CdromWriter.write_many(obj.cdroms, writer, 'cdrom', 'cdroms')
9668        if obj.cluster is not None:
9669            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
9670        if obj.cpu_profile is not None:
9671            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
9672        if obj.disk_attachments is not None:
9673            DiskAttachmentWriter.write_many(obj.disk_attachments, writer, 'disk_attachment', 'disk_attachments')
9674        if obj.graphics_consoles is not None:
9675            GraphicsConsoleWriter.write_many(obj.graphics_consoles, writer, 'graphics_console', 'graphics_consoles')
9676        if obj.mediated_devices is not None:
9677            VmMediatedDeviceWriter.write_many(obj.mediated_devices, writer, 'vm_mediated_device', 'mediated_devices')
9678        if obj.nics is not None:
9679            NicWriter.write_many(obj.nics, writer, 'nic', 'nics')
9680        if obj.permissions is not None:
9681            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
9682        if obj.quota is not None:
9683            QuotaWriter.write_one(obj.quota, writer, 'quota')
9684        if obj.storage_domain is not None:
9685            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
9686        if obj.tags is not None:
9687            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
9688        if obj.watchdogs is not None:
9689            WatchdogWriter.write_many(obj.watchdogs, writer, 'watchdog', 'watchdogs')
9690        writer.write_end()
9691
9692    @staticmethod
9693    def write_many(objs, writer, singular=None, plural=None):
9694        if singular is None:
9695            singular = 'template'
9696        if plural is None:
9697            plural = 'templates'
9698        writer.write_start(plural)
9699        if type(objs) == List:
9700            href = objs.href
9701            if href is not None:
9702                writer.write_attribute('href', href)
9703        for obj in objs:
9704            TemplateWriter.write_one(obj, writer, singular)
9705        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

TemplateWriter()
9555    def __init__(self):
9556        super(TemplateWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9558    @staticmethod
9559    def write_one(obj, writer, singular=None):
9560        if singular is None:
9561            singular = 'template'
9562        writer.write_start(singular)
9563        href = obj.href
9564        if href is not None:
9565            writer.write_attribute('href', href)
9566        if obj.id is not None:
9567            writer.write_attribute('id', obj.id)
9568        if obj.auto_pinning_policy is not None:
9569            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
9570        if obj.bios is not None:
9571            BiosWriter.write_one(obj.bios, writer, 'bios')
9572        if obj.comment is not None:
9573            Writer.write_string(writer, 'comment', obj.comment)
9574        if obj.console is not None:
9575            ConsoleWriter.write_one(obj.console, writer, 'console')
9576        if obj.cpu is not None:
9577            CpuWriter.write_one(obj.cpu, writer, 'cpu')
9578        if obj.cpu_pinning_policy is not None:
9579            Writer.write_string(writer, 'cpu_pinning_policy', obj.cpu_pinning_policy.value)
9580        if obj.cpu_shares is not None:
9581            Writer.write_integer(writer, 'cpu_shares', obj.cpu_shares)
9582        if obj.creation_time is not None:
9583            Writer.write_date(writer, 'creation_time', obj.creation_time)
9584        if obj.custom_compatibility_version is not None:
9585            VersionWriter.write_one(obj.custom_compatibility_version, writer, 'custom_compatibility_version')
9586        if obj.custom_cpu_model is not None:
9587            Writer.write_string(writer, 'custom_cpu_model', obj.custom_cpu_model)
9588        if obj.custom_emulated_machine is not None:
9589            Writer.write_string(writer, 'custom_emulated_machine', obj.custom_emulated_machine)
9590        if obj.custom_properties is not None:
9591            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
9592        if obj.delete_protected is not None:
9593            Writer.write_boolean(writer, 'delete_protected', obj.delete_protected)
9594        if obj.description is not None:
9595            Writer.write_string(writer, 'description', obj.description)
9596        if obj.display is not None:
9597            DisplayWriter.write_one(obj.display, writer, 'display')
9598        if obj.domain is not None:
9599            DomainWriter.write_one(obj.domain, writer, 'domain')
9600        if obj.high_availability is not None:
9601            HighAvailabilityWriter.write_one(obj.high_availability, writer, 'high_availability')
9602        if obj.initialization is not None:
9603            InitializationWriter.write_one(obj.initialization, writer, 'initialization')
9604        if obj.io is not None:
9605            IoWriter.write_one(obj.io, writer, 'io')
9606        if obj.large_icon is not None:
9607            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
9608        if obj.lease is not None:
9609            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
9610        if obj.memory is not None:
9611            Writer.write_integer(writer, 'memory', obj.memory)
9612        if obj.memory_policy is not None:
9613            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
9614        if obj.migration is not None:
9615            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
9616        if obj.migration_downtime is not None:
9617            Writer.write_integer(writer, 'migration_downtime', obj.migration_downtime)
9618        if obj.multi_queues_enabled is not None:
9619            Writer.write_boolean(writer, 'multi_queues_enabled', obj.multi_queues_enabled)
9620        if obj.name is not None:
9621            Writer.write_string(writer, 'name', obj.name)
9622        if obj.origin is not None:
9623            Writer.write_string(writer, 'origin', obj.origin)
9624        if obj.os is not None:
9625            OperatingSystemWriter.write_one(obj.os, writer, 'os')
9626        if obj.placement_policy is not None:
9627            VmPlacementPolicyWriter.write_one(obj.placement_policy, writer, 'placement_policy')
9628        if obj.rng_device is not None:
9629            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
9630        if obj.serial_number is not None:
9631            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
9632        if obj.small_icon is not None:
9633            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
9634        if obj.soundcard_enabled is not None:
9635            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
9636        if obj.sso is not None:
9637            SsoWriter.write_one(obj.sso, writer, 'sso')
9638        if obj.start_paused is not None:
9639            Writer.write_boolean(writer, 'start_paused', obj.start_paused)
9640        if obj.stateless is not None:
9641            Writer.write_boolean(writer, 'stateless', obj.stateless)
9642        if obj.status is not None:
9643            Writer.write_string(writer, 'status', obj.status.value)
9644        if obj.storage_error_resume_behaviour is not None:
9645            Writer.write_string(writer, 'storage_error_resume_behaviour', obj.storage_error_resume_behaviour.value)
9646        if obj.time_zone is not None:
9647            TimeZoneWriter.write_one(obj.time_zone, writer, 'time_zone')
9648        if obj.tpm_enabled is not None:
9649            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
9650        if obj.tunnel_migration is not None:
9651            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
9652        if obj.type is not None:
9653            Writer.write_string(writer, 'type', obj.type.value)
9654        if obj.usb is not None:
9655            UsbWriter.write_one(obj.usb, writer, 'usb')
9656        if obj.version is not None:
9657            TemplateVersionWriter.write_one(obj.version, writer, 'version')
9658        if obj.virtio_scsi is not None:
9659            VirtioScsiWriter.write_one(obj.virtio_scsi, writer, 'virtio_scsi')
9660        if obj.virtio_scsi_multi_queues is not None:
9661            Writer.write_integer(writer, 'virtio_scsi_multi_queues', obj.virtio_scsi_multi_queues)
9662        if obj.virtio_scsi_multi_queues_enabled is not None:
9663            Writer.write_boolean(writer, 'virtio_scsi_multi_queues_enabled', obj.virtio_scsi_multi_queues_enabled)
9664        if obj.vm is not None:
9665            VmWriter.write_one(obj.vm, writer, 'vm')
9666        if obj.cdroms is not None:
9667            CdromWriter.write_many(obj.cdroms, writer, 'cdrom', 'cdroms')
9668        if obj.cluster is not None:
9669            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
9670        if obj.cpu_profile is not None:
9671            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
9672        if obj.disk_attachments is not None:
9673            DiskAttachmentWriter.write_many(obj.disk_attachments, writer, 'disk_attachment', 'disk_attachments')
9674        if obj.graphics_consoles is not None:
9675            GraphicsConsoleWriter.write_many(obj.graphics_consoles, writer, 'graphics_console', 'graphics_consoles')
9676        if obj.mediated_devices is not None:
9677            VmMediatedDeviceWriter.write_many(obj.mediated_devices, writer, 'vm_mediated_device', 'mediated_devices')
9678        if obj.nics is not None:
9679            NicWriter.write_many(obj.nics, writer, 'nic', 'nics')
9680        if obj.permissions is not None:
9681            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
9682        if obj.quota is not None:
9683            QuotaWriter.write_one(obj.quota, writer, 'quota')
9684        if obj.storage_domain is not None:
9685            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
9686        if obj.tags is not None:
9687            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
9688        if obj.watchdogs is not None:
9689            WatchdogWriter.write_many(obj.watchdogs, writer, 'watchdog', 'watchdogs')
9690        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9692    @staticmethod
9693    def write_many(objs, writer, singular=None, plural=None):
9694        if singular is None:
9695            singular = 'template'
9696        if plural is None:
9697            plural = 'templates'
9698        writer.write_start(plural)
9699        if type(objs) == List:
9700            href = objs.href
9701            if href is not None:
9702                writer.write_attribute('href', href)
9703        for obj in objs:
9704            TemplateWriter.write_one(obj, writer, singular)
9705        writer.write_end()
class TemplateVersionWriter(ovirtsdk4.writer.Writer):
9708class TemplateVersionWriter(Writer):
9709
9710    def __init__(self):
9711        super(TemplateVersionWriter, self).__init__()
9712
9713    @staticmethod
9714    def write_one(obj, writer, singular=None):
9715        if singular is None:
9716            singular = 'template_version'
9717        writer.write_start(singular)
9718        href = obj.href
9719        if href is not None:
9720            writer.write_attribute('href', href)
9721        if obj.version_name is not None:
9722            Writer.write_string(writer, 'version_name', obj.version_name)
9723        if obj.version_number is not None:
9724            Writer.write_integer(writer, 'version_number', obj.version_number)
9725        if obj.base_template is not None:
9726            TemplateWriter.write_one(obj.base_template, writer, 'base_template')
9727        writer.write_end()
9728
9729    @staticmethod
9730    def write_many(objs, writer, singular=None, plural=None):
9731        if singular is None:
9732            singular = 'template_version'
9733        if plural is None:
9734            plural = 'template_versions'
9735        writer.write_start(plural)
9736        if type(objs) == List:
9737            href = objs.href
9738            if href is not None:
9739                writer.write_attribute('href', href)
9740        for obj in objs:
9741            TemplateVersionWriter.write_one(obj, writer, singular)
9742        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

TemplateVersionWriter()
9710    def __init__(self):
9711        super(TemplateVersionWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9713    @staticmethod
9714    def write_one(obj, writer, singular=None):
9715        if singular is None:
9716            singular = 'template_version'
9717        writer.write_start(singular)
9718        href = obj.href
9719        if href is not None:
9720            writer.write_attribute('href', href)
9721        if obj.version_name is not None:
9722            Writer.write_string(writer, 'version_name', obj.version_name)
9723        if obj.version_number is not None:
9724            Writer.write_integer(writer, 'version_number', obj.version_number)
9725        if obj.base_template is not None:
9726            TemplateWriter.write_one(obj.base_template, writer, 'base_template')
9727        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9729    @staticmethod
9730    def write_many(objs, writer, singular=None, plural=None):
9731        if singular is None:
9732            singular = 'template_version'
9733        if plural is None:
9734            plural = 'template_versions'
9735        writer.write_start(plural)
9736        if type(objs) == List:
9737            href = objs.href
9738            if href is not None:
9739                writer.write_attribute('href', href)
9740        for obj in objs:
9741            TemplateVersionWriter.write_one(obj, writer, singular)
9742        writer.write_end()
class TicketWriter(ovirtsdk4.writer.Writer):
9745class TicketWriter(Writer):
9746
9747    def __init__(self):
9748        super(TicketWriter, self).__init__()
9749
9750    @staticmethod
9751    def write_one(obj, writer, singular=None):
9752        if singular is None:
9753            singular = 'ticket'
9754        writer.write_start(singular)
9755        href = obj.href
9756        if href is not None:
9757            writer.write_attribute('href', href)
9758        if obj.expiry is not None:
9759            Writer.write_integer(writer, 'expiry', obj.expiry)
9760        if obj.value is not None:
9761            Writer.write_string(writer, 'value', obj.value)
9762        writer.write_end()
9763
9764    @staticmethod
9765    def write_many(objs, writer, singular=None, plural=None):
9766        if singular is None:
9767            singular = 'ticket'
9768        if plural is None:
9769            plural = 'tickets'
9770        writer.write_start(plural)
9771        if type(objs) == List:
9772            href = objs.href
9773            if href is not None:
9774                writer.write_attribute('href', href)
9775        for obj in objs:
9776            TicketWriter.write_one(obj, writer, singular)
9777        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

TicketWriter()
9747    def __init__(self):
9748        super(TicketWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9750    @staticmethod
9751    def write_one(obj, writer, singular=None):
9752        if singular is None:
9753            singular = 'ticket'
9754        writer.write_start(singular)
9755        href = obj.href
9756        if href is not None:
9757            writer.write_attribute('href', href)
9758        if obj.expiry is not None:
9759            Writer.write_integer(writer, 'expiry', obj.expiry)
9760        if obj.value is not None:
9761            Writer.write_string(writer, 'value', obj.value)
9762        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9764    @staticmethod
9765    def write_many(objs, writer, singular=None, plural=None):
9766        if singular is None:
9767            singular = 'ticket'
9768        if plural is None:
9769            plural = 'tickets'
9770        writer.write_start(plural)
9771        if type(objs) == List:
9772            href = objs.href
9773            if href is not None:
9774                writer.write_attribute('href', href)
9775        for obj in objs:
9776            TicketWriter.write_one(obj, writer, singular)
9777        writer.write_end()
class TimeZoneWriter(ovirtsdk4.writer.Writer):
9780class TimeZoneWriter(Writer):
9781
9782    def __init__(self):
9783        super(TimeZoneWriter, self).__init__()
9784
9785    @staticmethod
9786    def write_one(obj, writer, singular=None):
9787        if singular is None:
9788            singular = 'time_zone'
9789        writer.write_start(singular)
9790        href = obj.href
9791        if href is not None:
9792            writer.write_attribute('href', href)
9793        if obj.name is not None:
9794            Writer.write_string(writer, 'name', obj.name)
9795        if obj.utc_offset is not None:
9796            Writer.write_string(writer, 'utc_offset', obj.utc_offset)
9797        writer.write_end()
9798
9799    @staticmethod
9800    def write_many(objs, writer, singular=None, plural=None):
9801        if singular is None:
9802            singular = 'time_zone'
9803        if plural is None:
9804            plural = 'time_zones'
9805        writer.write_start(plural)
9806        if type(objs) == List:
9807            href = objs.href
9808            if href is not None:
9809                writer.write_attribute('href', href)
9810        for obj in objs:
9811            TimeZoneWriter.write_one(obj, writer, singular)
9812        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

TimeZoneWriter()
9782    def __init__(self):
9783        super(TimeZoneWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9785    @staticmethod
9786    def write_one(obj, writer, singular=None):
9787        if singular is None:
9788            singular = 'time_zone'
9789        writer.write_start(singular)
9790        href = obj.href
9791        if href is not None:
9792            writer.write_attribute('href', href)
9793        if obj.name is not None:
9794            Writer.write_string(writer, 'name', obj.name)
9795        if obj.utc_offset is not None:
9796            Writer.write_string(writer, 'utc_offset', obj.utc_offset)
9797        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9799    @staticmethod
9800    def write_many(objs, writer, singular=None, plural=None):
9801        if singular is None:
9802            singular = 'time_zone'
9803        if plural is None:
9804            plural = 'time_zones'
9805        writer.write_start(plural)
9806        if type(objs) == List:
9807            href = objs.href
9808            if href is not None:
9809                writer.write_attribute('href', href)
9810        for obj in objs:
9811            TimeZoneWriter.write_one(obj, writer, singular)
9812        writer.write_end()
class TransparentHugePagesWriter(ovirtsdk4.writer.Writer):
9815class TransparentHugePagesWriter(Writer):
9816
9817    def __init__(self):
9818        super(TransparentHugePagesWriter, self).__init__()
9819
9820    @staticmethod
9821    def write_one(obj, writer, singular=None):
9822        if singular is None:
9823            singular = 'transparent_hugepages'
9824        writer.write_start(singular)
9825        href = obj.href
9826        if href is not None:
9827            writer.write_attribute('href', href)
9828        if obj.enabled is not None:
9829            Writer.write_boolean(writer, 'enabled', obj.enabled)
9830        writer.write_end()
9831
9832    @staticmethod
9833    def write_many(objs, writer, singular=None, plural=None):
9834        if singular is None:
9835            singular = 'transparent_hugepages'
9836        if plural is None:
9837            plural = 'transparent_huge_pagess'
9838        writer.write_start(plural)
9839        if type(objs) == List:
9840            href = objs.href
9841            if href is not None:
9842                writer.write_attribute('href', href)
9843        for obj in objs:
9844            TransparentHugePagesWriter.write_one(obj, writer, singular)
9845        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

TransparentHugePagesWriter()
9817    def __init__(self):
9818        super(TransparentHugePagesWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9820    @staticmethod
9821    def write_one(obj, writer, singular=None):
9822        if singular is None:
9823            singular = 'transparent_hugepages'
9824        writer.write_start(singular)
9825        href = obj.href
9826        if href is not None:
9827            writer.write_attribute('href', href)
9828        if obj.enabled is not None:
9829            Writer.write_boolean(writer, 'enabled', obj.enabled)
9830        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9832    @staticmethod
9833    def write_many(objs, writer, singular=None, plural=None):
9834        if singular is None:
9835            singular = 'transparent_hugepages'
9836        if plural is None:
9837            plural = 'transparent_huge_pagess'
9838        writer.write_start(plural)
9839        if type(objs) == List:
9840            href = objs.href
9841            if href is not None:
9842                writer.write_attribute('href', href)
9843        for obj in objs:
9844            TransparentHugePagesWriter.write_one(obj, writer, singular)
9845        writer.write_end()
class UnmanagedNetworkWriter(ovirtsdk4.writer.Writer):
9848class UnmanagedNetworkWriter(Writer):
9849
9850    def __init__(self):
9851        super(UnmanagedNetworkWriter, self).__init__()
9852
9853    @staticmethod
9854    def write_one(obj, writer, singular=None):
9855        if singular is None:
9856            singular = 'unmanaged_network'
9857        writer.write_start(singular)
9858        href = obj.href
9859        if href is not None:
9860            writer.write_attribute('href', href)
9861        if obj.id is not None:
9862            writer.write_attribute('id', obj.id)
9863        if obj.comment is not None:
9864            Writer.write_string(writer, 'comment', obj.comment)
9865        if obj.description is not None:
9866            Writer.write_string(writer, 'description', obj.description)
9867        if obj.name is not None:
9868            Writer.write_string(writer, 'name', obj.name)
9869        if obj.host is not None:
9870            HostWriter.write_one(obj.host, writer, 'host')
9871        if obj.host_nic is not None:
9872            HostNicWriter.write_one(obj.host_nic, writer, 'host_nic')
9873        writer.write_end()
9874
9875    @staticmethod
9876    def write_many(objs, writer, singular=None, plural=None):
9877        if singular is None:
9878            singular = 'unmanaged_network'
9879        if plural is None:
9880            plural = 'unmanaged_networks'
9881        writer.write_start(plural)
9882        if type(objs) == List:
9883            href = objs.href
9884            if href is not None:
9885                writer.write_attribute('href', href)
9886        for obj in objs:
9887            UnmanagedNetworkWriter.write_one(obj, writer, singular)
9888        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

UnmanagedNetworkWriter()
9850    def __init__(self):
9851        super(UnmanagedNetworkWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9853    @staticmethod
9854    def write_one(obj, writer, singular=None):
9855        if singular is None:
9856            singular = 'unmanaged_network'
9857        writer.write_start(singular)
9858        href = obj.href
9859        if href is not None:
9860            writer.write_attribute('href', href)
9861        if obj.id is not None:
9862            writer.write_attribute('id', obj.id)
9863        if obj.comment is not None:
9864            Writer.write_string(writer, 'comment', obj.comment)
9865        if obj.description is not None:
9866            Writer.write_string(writer, 'description', obj.description)
9867        if obj.name is not None:
9868            Writer.write_string(writer, 'name', obj.name)
9869        if obj.host is not None:
9870            HostWriter.write_one(obj.host, writer, 'host')
9871        if obj.host_nic is not None:
9872            HostNicWriter.write_one(obj.host_nic, writer, 'host_nic')
9873        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9875    @staticmethod
9876    def write_many(objs, writer, singular=None, plural=None):
9877        if singular is None:
9878            singular = 'unmanaged_network'
9879        if plural is None:
9880            plural = 'unmanaged_networks'
9881        writer.write_start(plural)
9882        if type(objs) == List:
9883            href = objs.href
9884            if href is not None:
9885                writer.write_attribute('href', href)
9886        for obj in objs:
9887            UnmanagedNetworkWriter.write_one(obj, writer, singular)
9888        writer.write_end()
class UsbWriter(ovirtsdk4.writer.Writer):
9891class UsbWriter(Writer):
9892
9893    def __init__(self):
9894        super(UsbWriter, self).__init__()
9895
9896    @staticmethod
9897    def write_one(obj, writer, singular=None):
9898        if singular is None:
9899            singular = 'usb'
9900        writer.write_start(singular)
9901        href = obj.href
9902        if href is not None:
9903            writer.write_attribute('href', href)
9904        if obj.enabled is not None:
9905            Writer.write_boolean(writer, 'enabled', obj.enabled)
9906        if obj.type is not None:
9907            Writer.write_string(writer, 'type', obj.type.value)
9908        writer.write_end()
9909
9910    @staticmethod
9911    def write_many(objs, writer, singular=None, plural=None):
9912        if singular is None:
9913            singular = 'usb'
9914        if plural is None:
9915            plural = 'usbs'
9916        writer.write_start(plural)
9917        if type(objs) == List:
9918            href = objs.href
9919            if href is not None:
9920                writer.write_attribute('href', href)
9921        for obj in objs:
9922            UsbWriter.write_one(obj, writer, singular)
9923        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

UsbWriter()
9893    def __init__(self):
9894        super(UsbWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9896    @staticmethod
9897    def write_one(obj, writer, singular=None):
9898        if singular is None:
9899            singular = 'usb'
9900        writer.write_start(singular)
9901        href = obj.href
9902        if href is not None:
9903            writer.write_attribute('href', href)
9904        if obj.enabled is not None:
9905            Writer.write_boolean(writer, 'enabled', obj.enabled)
9906        if obj.type is not None:
9907            Writer.write_string(writer, 'type', obj.type.value)
9908        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9910    @staticmethod
9911    def write_many(objs, writer, singular=None, plural=None):
9912        if singular is None:
9913            singular = 'usb'
9914        if plural is None:
9915            plural = 'usbs'
9916        writer.write_start(plural)
9917        if type(objs) == List:
9918            href = objs.href
9919            if href is not None:
9920                writer.write_attribute('href', href)
9921        for obj in objs:
9922            UsbWriter.write_one(obj, writer, singular)
9923        writer.write_end()
class UserWriter(ovirtsdk4.writer.Writer):
9926class UserWriter(Writer):
9927
9928    def __init__(self):
9929        super(UserWriter, self).__init__()
9930
9931    @staticmethod
9932    def write_one(obj, writer, singular=None):
9933        if singular is None:
9934            singular = 'user'
9935        writer.write_start(singular)
9936        href = obj.href
9937        if href is not None:
9938            writer.write_attribute('href', href)
9939        if obj.id is not None:
9940            writer.write_attribute('id', obj.id)
9941        if obj.comment is not None:
9942            Writer.write_string(writer, 'comment', obj.comment)
9943        if obj.department is not None:
9944            Writer.write_string(writer, 'department', obj.department)
9945        if obj.description is not None:
9946            Writer.write_string(writer, 'description', obj.description)
9947        if obj.domain_entry_id is not None:
9948            Writer.write_string(writer, 'domain_entry_id', obj.domain_entry_id)
9949        if obj.email is not None:
9950            Writer.write_string(writer, 'email', obj.email)
9951        if obj.last_name is not None:
9952            Writer.write_string(writer, 'last_name', obj.last_name)
9953        if obj.logged_in is not None:
9954            Writer.write_boolean(writer, 'logged_in', obj.logged_in)
9955        if obj.name is not None:
9956            Writer.write_string(writer, 'name', obj.name)
9957        if obj.namespace is not None:
9958            Writer.write_string(writer, 'namespace', obj.namespace)
9959        if obj.password is not None:
9960            Writer.write_string(writer, 'password', obj.password)
9961        if obj.principal is not None:
9962            Writer.write_string(writer, 'principal', obj.principal)
9963        if obj.user_name is not None:
9964            Writer.write_string(writer, 'user_name', obj.user_name)
9965        if obj.user_options is not None:
9966            PropertyWriter.write_many(obj.user_options, writer, 'property', 'user_options')
9967        if obj.domain is not None:
9968            DomainWriter.write_one(obj.domain, writer, 'domain')
9969        if obj.groups is not None:
9970            GroupWriter.write_many(obj.groups, writer, 'group', 'groups')
9971        if obj.options is not None:
9972            UserOptionWriter.write_many(obj.options, writer, 'user_option', 'options')
9973        if obj.permissions is not None:
9974            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
9975        if obj.roles is not None:
9976            RoleWriter.write_many(obj.roles, writer, 'role', 'roles')
9977        if obj.ssh_public_keys is not None:
9978            SshPublicKeyWriter.write_many(obj.ssh_public_keys, writer, 'ssh_public_key', 'ssh_public_keys')
9979        if obj.tags is not None:
9980            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
9981        writer.write_end()
9982
9983    @staticmethod
9984    def write_many(objs, writer, singular=None, plural=None):
9985        if singular is None:
9986            singular = 'user'
9987        if plural is None:
9988            plural = 'users'
9989        writer.write_start(plural)
9990        if type(objs) == List:
9991            href = objs.href
9992            if href is not None:
9993                writer.write_attribute('href', href)
9994        for obj in objs:
9995            UserWriter.write_one(obj, writer, singular)
9996        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

UserWriter()
9928    def __init__(self):
9929        super(UserWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
9931    @staticmethod
9932    def write_one(obj, writer, singular=None):
9933        if singular is None:
9934            singular = 'user'
9935        writer.write_start(singular)
9936        href = obj.href
9937        if href is not None:
9938            writer.write_attribute('href', href)
9939        if obj.id is not None:
9940            writer.write_attribute('id', obj.id)
9941        if obj.comment is not None:
9942            Writer.write_string(writer, 'comment', obj.comment)
9943        if obj.department is not None:
9944            Writer.write_string(writer, 'department', obj.department)
9945        if obj.description is not None:
9946            Writer.write_string(writer, 'description', obj.description)
9947        if obj.domain_entry_id is not None:
9948            Writer.write_string(writer, 'domain_entry_id', obj.domain_entry_id)
9949        if obj.email is not None:
9950            Writer.write_string(writer, 'email', obj.email)
9951        if obj.last_name is not None:
9952            Writer.write_string(writer, 'last_name', obj.last_name)
9953        if obj.logged_in is not None:
9954            Writer.write_boolean(writer, 'logged_in', obj.logged_in)
9955        if obj.name is not None:
9956            Writer.write_string(writer, 'name', obj.name)
9957        if obj.namespace is not None:
9958            Writer.write_string(writer, 'namespace', obj.namespace)
9959        if obj.password is not None:
9960            Writer.write_string(writer, 'password', obj.password)
9961        if obj.principal is not None:
9962            Writer.write_string(writer, 'principal', obj.principal)
9963        if obj.user_name is not None:
9964            Writer.write_string(writer, 'user_name', obj.user_name)
9965        if obj.user_options is not None:
9966            PropertyWriter.write_many(obj.user_options, writer, 'property', 'user_options')
9967        if obj.domain is not None:
9968            DomainWriter.write_one(obj.domain, writer, 'domain')
9969        if obj.groups is not None:
9970            GroupWriter.write_many(obj.groups, writer, 'group', 'groups')
9971        if obj.options is not None:
9972            UserOptionWriter.write_many(obj.options, writer, 'user_option', 'options')
9973        if obj.permissions is not None:
9974            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
9975        if obj.roles is not None:
9976            RoleWriter.write_many(obj.roles, writer, 'role', 'roles')
9977        if obj.ssh_public_keys is not None:
9978            SshPublicKeyWriter.write_many(obj.ssh_public_keys, writer, 'ssh_public_key', 'ssh_public_keys')
9979        if obj.tags is not None:
9980            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
9981        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
9983    @staticmethod
9984    def write_many(objs, writer, singular=None, plural=None):
9985        if singular is None:
9986            singular = 'user'
9987        if plural is None:
9988            plural = 'users'
9989        writer.write_start(plural)
9990        if type(objs) == List:
9991            href = objs.href
9992            if href is not None:
9993                writer.write_attribute('href', href)
9994        for obj in objs:
9995            UserWriter.write_one(obj, writer, singular)
9996        writer.write_end()
class UserOptionWriter(ovirtsdk4.writer.Writer):
 9999class UserOptionWriter(Writer):
10000
10001    def __init__(self):
10002        super(UserOptionWriter, self).__init__()
10003
10004    @staticmethod
10005    def write_one(obj, writer, singular=None):
10006        if singular is None:
10007            singular = 'user_option'
10008        writer.write_start(singular)
10009        href = obj.href
10010        if href is not None:
10011            writer.write_attribute('href', href)
10012        if obj.id is not None:
10013            writer.write_attribute('id', obj.id)
10014        if obj.comment is not None:
10015            Writer.write_string(writer, 'comment', obj.comment)
10016        if obj.content is not None:
10017            Writer.write_string(writer, 'content', obj.content)
10018        if obj.description is not None:
10019            Writer.write_string(writer, 'description', obj.description)
10020        if obj.name is not None:
10021            Writer.write_string(writer, 'name', obj.name)
10022        if obj.user is not None:
10023            UserWriter.write_one(obj.user, writer, 'user')
10024        writer.write_end()
10025
10026    @staticmethod
10027    def write_many(objs, writer, singular=None, plural=None):
10028        if singular is None:
10029            singular = 'user_option'
10030        if plural is None:
10031            plural = 'user_options'
10032        writer.write_start(plural)
10033        if type(objs) == List:
10034            href = objs.href
10035            if href is not None:
10036                writer.write_attribute('href', href)
10037        for obj in objs:
10038            UserOptionWriter.write_one(obj, writer, singular)
10039        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

UserOptionWriter()
10001    def __init__(self):
10002        super(UserOptionWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10004    @staticmethod
10005    def write_one(obj, writer, singular=None):
10006        if singular is None:
10007            singular = 'user_option'
10008        writer.write_start(singular)
10009        href = obj.href
10010        if href is not None:
10011            writer.write_attribute('href', href)
10012        if obj.id is not None:
10013            writer.write_attribute('id', obj.id)
10014        if obj.comment is not None:
10015            Writer.write_string(writer, 'comment', obj.comment)
10016        if obj.content is not None:
10017            Writer.write_string(writer, 'content', obj.content)
10018        if obj.description is not None:
10019            Writer.write_string(writer, 'description', obj.description)
10020        if obj.name is not None:
10021            Writer.write_string(writer, 'name', obj.name)
10022        if obj.user is not None:
10023            UserWriter.write_one(obj.user, writer, 'user')
10024        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10026    @staticmethod
10027    def write_many(objs, writer, singular=None, plural=None):
10028        if singular is None:
10029            singular = 'user_option'
10030        if plural is None:
10031            plural = 'user_options'
10032        writer.write_start(plural)
10033        if type(objs) == List:
10034            href = objs.href
10035            if href is not None:
10036                writer.write_attribute('href', href)
10037        for obj in objs:
10038            UserOptionWriter.write_one(obj, writer, singular)
10039        writer.write_end()
class ValueWriter(ovirtsdk4.writer.Writer):
10042class ValueWriter(Writer):
10043
10044    def __init__(self):
10045        super(ValueWriter, self).__init__()
10046
10047    @staticmethod
10048    def write_one(obj, writer, singular=None):
10049        if singular is None:
10050            singular = 'value'
10051        writer.write_start(singular)
10052        href = obj.href
10053        if href is not None:
10054            writer.write_attribute('href', href)
10055        if obj.datum is not None:
10056            Writer.write_decimal(writer, 'datum', obj.datum)
10057        if obj.detail is not None:
10058            Writer.write_string(writer, 'detail', obj.detail)
10059        writer.write_end()
10060
10061    @staticmethod
10062    def write_many(objs, writer, singular=None, plural=None):
10063        if singular is None:
10064            singular = 'value'
10065        if plural is None:
10066            plural = 'values'
10067        writer.write_start(plural)
10068        if type(objs) == List:
10069            href = objs.href
10070            if href is not None:
10071                writer.write_attribute('href', href)
10072        for obj in objs:
10073            ValueWriter.write_one(obj, writer, singular)
10074        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

ValueWriter()
10044    def __init__(self):
10045        super(ValueWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10047    @staticmethod
10048    def write_one(obj, writer, singular=None):
10049        if singular is None:
10050            singular = 'value'
10051        writer.write_start(singular)
10052        href = obj.href
10053        if href is not None:
10054            writer.write_attribute('href', href)
10055        if obj.datum is not None:
10056            Writer.write_decimal(writer, 'datum', obj.datum)
10057        if obj.detail is not None:
10058            Writer.write_string(writer, 'detail', obj.detail)
10059        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10061    @staticmethod
10062    def write_many(objs, writer, singular=None, plural=None):
10063        if singular is None:
10064            singular = 'value'
10065        if plural is None:
10066            plural = 'values'
10067        writer.write_start(plural)
10068        if type(objs) == List:
10069            href = objs.href
10070            if href is not None:
10071                writer.write_attribute('href', href)
10072        for obj in objs:
10073            ValueWriter.write_one(obj, writer, singular)
10074        writer.write_end()
class VcpuPinWriter(ovirtsdk4.writer.Writer):
10077class VcpuPinWriter(Writer):
10078
10079    def __init__(self):
10080        super(VcpuPinWriter, self).__init__()
10081
10082    @staticmethod
10083    def write_one(obj, writer, singular=None):
10084        if singular is None:
10085            singular = 'vcpu_pin'
10086        writer.write_start(singular)
10087        href = obj.href
10088        if href is not None:
10089            writer.write_attribute('href', href)
10090        if obj.cpu_set is not None:
10091            Writer.write_string(writer, 'cpu_set', obj.cpu_set)
10092        if obj.vcpu is not None:
10093            Writer.write_integer(writer, 'vcpu', obj.vcpu)
10094        writer.write_end()
10095
10096    @staticmethod
10097    def write_many(objs, writer, singular=None, plural=None):
10098        if singular is None:
10099            singular = 'vcpu_pin'
10100        if plural is None:
10101            plural = 'vcpu_pins'
10102        writer.write_start(plural)
10103        if type(objs) == List:
10104            href = objs.href
10105            if href is not None:
10106                writer.write_attribute('href', href)
10107        for obj in objs:
10108            VcpuPinWriter.write_one(obj, writer, singular)
10109        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VcpuPinWriter()
10079    def __init__(self):
10080        super(VcpuPinWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10082    @staticmethod
10083    def write_one(obj, writer, singular=None):
10084        if singular is None:
10085            singular = 'vcpu_pin'
10086        writer.write_start(singular)
10087        href = obj.href
10088        if href is not None:
10089            writer.write_attribute('href', href)
10090        if obj.cpu_set is not None:
10091            Writer.write_string(writer, 'cpu_set', obj.cpu_set)
10092        if obj.vcpu is not None:
10093            Writer.write_integer(writer, 'vcpu', obj.vcpu)
10094        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10096    @staticmethod
10097    def write_many(objs, writer, singular=None, plural=None):
10098        if singular is None:
10099            singular = 'vcpu_pin'
10100        if plural is None:
10101            plural = 'vcpu_pins'
10102        writer.write_start(plural)
10103        if type(objs) == List:
10104            href = objs.href
10105            if href is not None:
10106                writer.write_attribute('href', href)
10107        for obj in objs:
10108            VcpuPinWriter.write_one(obj, writer, singular)
10109        writer.write_end()
class VendorWriter(ovirtsdk4.writer.Writer):
10112class VendorWriter(Writer):
10113
10114    def __init__(self):
10115        super(VendorWriter, self).__init__()
10116
10117    @staticmethod
10118    def write_one(obj, writer, singular=None):
10119        if singular is None:
10120            singular = 'vendor'
10121        writer.write_start(singular)
10122        href = obj.href
10123        if href is not None:
10124            writer.write_attribute('href', href)
10125        if obj.id is not None:
10126            writer.write_attribute('id', obj.id)
10127        if obj.comment is not None:
10128            Writer.write_string(writer, 'comment', obj.comment)
10129        if obj.description is not None:
10130            Writer.write_string(writer, 'description', obj.description)
10131        if obj.name is not None:
10132            Writer.write_string(writer, 'name', obj.name)
10133        writer.write_end()
10134
10135    @staticmethod
10136    def write_many(objs, writer, singular=None, plural=None):
10137        if singular is None:
10138            singular = 'vendor'
10139        if plural is None:
10140            plural = 'vendors'
10141        writer.write_start(plural)
10142        if type(objs) == List:
10143            href = objs.href
10144            if href is not None:
10145                writer.write_attribute('href', href)
10146        for obj in objs:
10147            VendorWriter.write_one(obj, writer, singular)
10148        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VendorWriter()
10114    def __init__(self):
10115        super(VendorWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10117    @staticmethod
10118    def write_one(obj, writer, singular=None):
10119        if singular is None:
10120            singular = 'vendor'
10121        writer.write_start(singular)
10122        href = obj.href
10123        if href is not None:
10124            writer.write_attribute('href', href)
10125        if obj.id is not None:
10126            writer.write_attribute('id', obj.id)
10127        if obj.comment is not None:
10128            Writer.write_string(writer, 'comment', obj.comment)
10129        if obj.description is not None:
10130            Writer.write_string(writer, 'description', obj.description)
10131        if obj.name is not None:
10132            Writer.write_string(writer, 'name', obj.name)
10133        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10135    @staticmethod
10136    def write_many(objs, writer, singular=None, plural=None):
10137        if singular is None:
10138            singular = 'vendor'
10139        if plural is None:
10140            plural = 'vendors'
10141        writer.write_start(plural)
10142        if type(objs) == List:
10143            href = objs.href
10144            if href is not None:
10145                writer.write_attribute('href', href)
10146        for obj in objs:
10147            VendorWriter.write_one(obj, writer, singular)
10148        writer.write_end()
class VersionWriter(ovirtsdk4.writer.Writer):
10151class VersionWriter(Writer):
10152
10153    def __init__(self):
10154        super(VersionWriter, self).__init__()
10155
10156    @staticmethod
10157    def write_one(obj, writer, singular=None):
10158        if singular is None:
10159            singular = 'version'
10160        writer.write_start(singular)
10161        href = obj.href
10162        if href is not None:
10163            writer.write_attribute('href', href)
10164        if obj.id is not None:
10165            writer.write_attribute('id', obj.id)
10166        if obj.build is not None:
10167            Writer.write_integer(writer, 'build', obj.build)
10168        if obj.comment is not None:
10169            Writer.write_string(writer, 'comment', obj.comment)
10170        if obj.description is not None:
10171            Writer.write_string(writer, 'description', obj.description)
10172        if obj.full_version is not None:
10173            Writer.write_string(writer, 'full_version', obj.full_version)
10174        if obj.major is not None:
10175            Writer.write_integer(writer, 'major', obj.major)
10176        if obj.minor is not None:
10177            Writer.write_integer(writer, 'minor', obj.minor)
10178        if obj.name is not None:
10179            Writer.write_string(writer, 'name', obj.name)
10180        if obj.revision is not None:
10181            Writer.write_integer(writer, 'revision', obj.revision)
10182        writer.write_end()
10183
10184    @staticmethod
10185    def write_many(objs, writer, singular=None, plural=None):
10186        if singular is None:
10187            singular = 'version'
10188        if plural is None:
10189            plural = 'versions'
10190        writer.write_start(plural)
10191        if type(objs) == List:
10192            href = objs.href
10193            if href is not None:
10194                writer.write_attribute('href', href)
10195        for obj in objs:
10196            VersionWriter.write_one(obj, writer, singular)
10197        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VersionWriter()
10153    def __init__(self):
10154        super(VersionWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10156    @staticmethod
10157    def write_one(obj, writer, singular=None):
10158        if singular is None:
10159            singular = 'version'
10160        writer.write_start(singular)
10161        href = obj.href
10162        if href is not None:
10163            writer.write_attribute('href', href)
10164        if obj.id is not None:
10165            writer.write_attribute('id', obj.id)
10166        if obj.build is not None:
10167            Writer.write_integer(writer, 'build', obj.build)
10168        if obj.comment is not None:
10169            Writer.write_string(writer, 'comment', obj.comment)
10170        if obj.description is not None:
10171            Writer.write_string(writer, 'description', obj.description)
10172        if obj.full_version is not None:
10173            Writer.write_string(writer, 'full_version', obj.full_version)
10174        if obj.major is not None:
10175            Writer.write_integer(writer, 'major', obj.major)
10176        if obj.minor is not None:
10177            Writer.write_integer(writer, 'minor', obj.minor)
10178        if obj.name is not None:
10179            Writer.write_string(writer, 'name', obj.name)
10180        if obj.revision is not None:
10181            Writer.write_integer(writer, 'revision', obj.revision)
10182        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10184    @staticmethod
10185    def write_many(objs, writer, singular=None, plural=None):
10186        if singular is None:
10187            singular = 'version'
10188        if plural is None:
10189            plural = 'versions'
10190        writer.write_start(plural)
10191        if type(objs) == List:
10192            href = objs.href
10193            if href is not None:
10194                writer.write_attribute('href', href)
10195        for obj in objs:
10196            VersionWriter.write_one(obj, writer, singular)
10197        writer.write_end()
class VirtioScsiWriter(ovirtsdk4.writer.Writer):
10200class VirtioScsiWriter(Writer):
10201
10202    def __init__(self):
10203        super(VirtioScsiWriter, self).__init__()
10204
10205    @staticmethod
10206    def write_one(obj, writer, singular=None):
10207        if singular is None:
10208            singular = 'virtio_scsi'
10209        writer.write_start(singular)
10210        href = obj.href
10211        if href is not None:
10212            writer.write_attribute('href', href)
10213        if obj.enabled is not None:
10214            Writer.write_boolean(writer, 'enabled', obj.enabled)
10215        writer.write_end()
10216
10217    @staticmethod
10218    def write_many(objs, writer, singular=None, plural=None):
10219        if singular is None:
10220            singular = 'virtio_scsi'
10221        if plural is None:
10222            plural = 'virtio_scsis'
10223        writer.write_start(plural)
10224        if type(objs) == List:
10225            href = objs.href
10226            if href is not None:
10227                writer.write_attribute('href', href)
10228        for obj in objs:
10229            VirtioScsiWriter.write_one(obj, writer, singular)
10230        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VirtioScsiWriter()
10202    def __init__(self):
10203        super(VirtioScsiWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10205    @staticmethod
10206    def write_one(obj, writer, singular=None):
10207        if singular is None:
10208            singular = 'virtio_scsi'
10209        writer.write_start(singular)
10210        href = obj.href
10211        if href is not None:
10212            writer.write_attribute('href', href)
10213        if obj.enabled is not None:
10214            Writer.write_boolean(writer, 'enabled', obj.enabled)
10215        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10217    @staticmethod
10218    def write_many(objs, writer, singular=None, plural=None):
10219        if singular is None:
10220            singular = 'virtio_scsi'
10221        if plural is None:
10222            plural = 'virtio_scsis'
10223        writer.write_start(plural)
10224        if type(objs) == List:
10225            href = objs.href
10226            if href is not None:
10227                writer.write_attribute('href', href)
10228        for obj in objs:
10229            VirtioScsiWriter.write_one(obj, writer, singular)
10230        writer.write_end()
class VirtualNumaNodeWriter(ovirtsdk4.writer.Writer):
10233class VirtualNumaNodeWriter(Writer):
10234
10235    def __init__(self):
10236        super(VirtualNumaNodeWriter, self).__init__()
10237
10238    @staticmethod
10239    def write_one(obj, writer, singular=None):
10240        if singular is None:
10241            singular = 'vm_numa_node'
10242        writer.write_start(singular)
10243        href = obj.href
10244        if href is not None:
10245            writer.write_attribute('href', href)
10246        if obj.id is not None:
10247            writer.write_attribute('id', obj.id)
10248        if obj.comment is not None:
10249            Writer.write_string(writer, 'comment', obj.comment)
10250        if obj.cpu is not None:
10251            CpuWriter.write_one(obj.cpu, writer, 'cpu')
10252        if obj.description is not None:
10253            Writer.write_string(writer, 'description', obj.description)
10254        if obj.index is not None:
10255            Writer.write_integer(writer, 'index', obj.index)
10256        if obj.memory is not None:
10257            Writer.write_integer(writer, 'memory', obj.memory)
10258        if obj.name is not None:
10259            Writer.write_string(writer, 'name', obj.name)
10260        if obj.node_distance is not None:
10261            Writer.write_string(writer, 'node_distance', obj.node_distance)
10262        if obj.numa_node_pins is not None:
10263            NumaNodePinWriter.write_many(obj.numa_node_pins, writer, 'numa_node_pin', 'numa_node_pins')
10264        if obj.numa_tune_mode is not None:
10265            Writer.write_string(writer, 'numa_tune_mode', obj.numa_tune_mode.value)
10266        if obj.host is not None:
10267            HostWriter.write_one(obj.host, writer, 'host')
10268        if obj.statistics is not None:
10269            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
10270        if obj.vm is not None:
10271            VmWriter.write_one(obj.vm, writer, 'vm')
10272        writer.write_end()
10273
10274    @staticmethod
10275    def write_many(objs, writer, singular=None, plural=None):
10276        if singular is None:
10277            singular = 'vm_numa_node'
10278        if plural is None:
10279            plural = 'vm_numa_nodes'
10280        writer.write_start(plural)
10281        if type(objs) == List:
10282            href = objs.href
10283            if href is not None:
10284                writer.write_attribute('href', href)
10285        for obj in objs:
10286            VirtualNumaNodeWriter.write_one(obj, writer, singular)
10287        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VirtualNumaNodeWriter()
10235    def __init__(self):
10236        super(VirtualNumaNodeWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10238    @staticmethod
10239    def write_one(obj, writer, singular=None):
10240        if singular is None:
10241            singular = 'vm_numa_node'
10242        writer.write_start(singular)
10243        href = obj.href
10244        if href is not None:
10245            writer.write_attribute('href', href)
10246        if obj.id is not None:
10247            writer.write_attribute('id', obj.id)
10248        if obj.comment is not None:
10249            Writer.write_string(writer, 'comment', obj.comment)
10250        if obj.cpu is not None:
10251            CpuWriter.write_one(obj.cpu, writer, 'cpu')
10252        if obj.description is not None:
10253            Writer.write_string(writer, 'description', obj.description)
10254        if obj.index is not None:
10255            Writer.write_integer(writer, 'index', obj.index)
10256        if obj.memory is not None:
10257            Writer.write_integer(writer, 'memory', obj.memory)
10258        if obj.name is not None:
10259            Writer.write_string(writer, 'name', obj.name)
10260        if obj.node_distance is not None:
10261            Writer.write_string(writer, 'node_distance', obj.node_distance)
10262        if obj.numa_node_pins is not None:
10263            NumaNodePinWriter.write_many(obj.numa_node_pins, writer, 'numa_node_pin', 'numa_node_pins')
10264        if obj.numa_tune_mode is not None:
10265            Writer.write_string(writer, 'numa_tune_mode', obj.numa_tune_mode.value)
10266        if obj.host is not None:
10267            HostWriter.write_one(obj.host, writer, 'host')
10268        if obj.statistics is not None:
10269            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
10270        if obj.vm is not None:
10271            VmWriter.write_one(obj.vm, writer, 'vm')
10272        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10274    @staticmethod
10275    def write_many(objs, writer, singular=None, plural=None):
10276        if singular is None:
10277            singular = 'vm_numa_node'
10278        if plural is None:
10279            plural = 'vm_numa_nodes'
10280        writer.write_start(plural)
10281        if type(objs) == List:
10282            href = objs.href
10283            if href is not None:
10284                writer.write_attribute('href', href)
10285        for obj in objs:
10286            VirtualNumaNodeWriter.write_one(obj, writer, singular)
10287        writer.write_end()
class VlanWriter(ovirtsdk4.writer.Writer):
10290class VlanWriter(Writer):
10291
10292    def __init__(self):
10293        super(VlanWriter, self).__init__()
10294
10295    @staticmethod
10296    def write_one(obj, writer, singular=None):
10297        if singular is None:
10298            singular = 'vlan'
10299        writer.write_start(singular)
10300        href = obj.href
10301        if href is not None:
10302            writer.write_attribute('href', href)
10303        if obj.id is not None:
10304            writer.write_attribute('id', str(obj.id))
10305        writer.write_end()
10306
10307    @staticmethod
10308    def write_many(objs, writer, singular=None, plural=None):
10309        if singular is None:
10310            singular = 'vlan'
10311        if plural is None:
10312            plural = 'vlans'
10313        writer.write_start(plural)
10314        if type(objs) == List:
10315            href = objs.href
10316            if href is not None:
10317                writer.write_attribute('href', href)
10318        for obj in objs:
10319            VlanWriter.write_one(obj, writer, singular)
10320        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VlanWriter()
10292    def __init__(self):
10293        super(VlanWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10295    @staticmethod
10296    def write_one(obj, writer, singular=None):
10297        if singular is None:
10298            singular = 'vlan'
10299        writer.write_start(singular)
10300        href = obj.href
10301        if href is not None:
10302            writer.write_attribute('href', href)
10303        if obj.id is not None:
10304            writer.write_attribute('id', str(obj.id))
10305        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10307    @staticmethod
10308    def write_many(objs, writer, singular=None, plural=None):
10309        if singular is None:
10310            singular = 'vlan'
10311        if plural is None:
10312            plural = 'vlans'
10313        writer.write_start(plural)
10314        if type(objs) == List:
10315            href = objs.href
10316            if href is not None:
10317                writer.write_attribute('href', href)
10318        for obj in objs:
10319            VlanWriter.write_one(obj, writer, singular)
10320        writer.write_end()
class VmWriter(ovirtsdk4.writer.Writer):
10323class VmWriter(Writer):
10324
10325    def __init__(self):
10326        super(VmWriter, self).__init__()
10327
10328    @staticmethod
10329    def write_one(obj, writer, singular=None):
10330        if singular is None:
10331            singular = 'vm'
10332        writer.write_start(singular)
10333        href = obj.href
10334        if href is not None:
10335            writer.write_attribute('href', href)
10336        if obj.id is not None:
10337            writer.write_attribute('id', obj.id)
10338        if obj.auto_pinning_policy is not None:
10339            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
10340        if obj.bios is not None:
10341            BiosWriter.write_one(obj.bios, writer, 'bios')
10342        if obj.comment is not None:
10343            Writer.write_string(writer, 'comment', obj.comment)
10344        if obj.console is not None:
10345            ConsoleWriter.write_one(obj.console, writer, 'console')
10346        if obj.cpu is not None:
10347            CpuWriter.write_one(obj.cpu, writer, 'cpu')
10348        if obj.cpu_pinning_policy is not None:
10349            Writer.write_string(writer, 'cpu_pinning_policy', obj.cpu_pinning_policy.value)
10350        if obj.cpu_shares is not None:
10351            Writer.write_integer(writer, 'cpu_shares', obj.cpu_shares)
10352        if obj.creation_time is not None:
10353            Writer.write_date(writer, 'creation_time', obj.creation_time)
10354        if obj.custom_compatibility_version is not None:
10355            VersionWriter.write_one(obj.custom_compatibility_version, writer, 'custom_compatibility_version')
10356        if obj.custom_cpu_model is not None:
10357            Writer.write_string(writer, 'custom_cpu_model', obj.custom_cpu_model)
10358        if obj.custom_emulated_machine is not None:
10359            Writer.write_string(writer, 'custom_emulated_machine', obj.custom_emulated_machine)
10360        if obj.custom_properties is not None:
10361            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
10362        if obj.delete_protected is not None:
10363            Writer.write_boolean(writer, 'delete_protected', obj.delete_protected)
10364        if obj.description is not None:
10365            Writer.write_string(writer, 'description', obj.description)
10366        if obj.display is not None:
10367            DisplayWriter.write_one(obj.display, writer, 'display')
10368        if obj.domain is not None:
10369            DomainWriter.write_one(obj.domain, writer, 'domain')
10370        if obj.fqdn is not None:
10371            Writer.write_string(writer, 'fqdn', obj.fqdn)
10372        if obj.guest_operating_system is not None:
10373            GuestOperatingSystemWriter.write_one(obj.guest_operating_system, writer, 'guest_operating_system')
10374        if obj.guest_time_zone is not None:
10375            TimeZoneWriter.write_one(obj.guest_time_zone, writer, 'guest_time_zone')
10376        if obj.has_illegal_images is not None:
10377            Writer.write_boolean(writer, 'has_illegal_images', obj.has_illegal_images)
10378        if obj.high_availability is not None:
10379            HighAvailabilityWriter.write_one(obj.high_availability, writer, 'high_availability')
10380        if obj.initialization is not None:
10381            InitializationWriter.write_one(obj.initialization, writer, 'initialization')
10382        if obj.io is not None:
10383            IoWriter.write_one(obj.io, writer, 'io')
10384        if obj.large_icon is not None:
10385            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
10386        if obj.lease is not None:
10387            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
10388        if obj.memory is not None:
10389            Writer.write_integer(writer, 'memory', obj.memory)
10390        if obj.memory_policy is not None:
10391            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
10392        if obj.migration is not None:
10393            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
10394        if obj.migration_downtime is not None:
10395            Writer.write_integer(writer, 'migration_downtime', obj.migration_downtime)
10396        if obj.multi_queues_enabled is not None:
10397            Writer.write_boolean(writer, 'multi_queues_enabled', obj.multi_queues_enabled)
10398        if obj.name is not None:
10399            Writer.write_string(writer, 'name', obj.name)
10400        if obj.next_run_configuration_exists is not None:
10401            Writer.write_boolean(writer, 'next_run_configuration_exists', obj.next_run_configuration_exists)
10402        if obj.numa_tune_mode is not None:
10403            Writer.write_string(writer, 'numa_tune_mode', obj.numa_tune_mode.value)
10404        if obj.origin is not None:
10405            Writer.write_string(writer, 'origin', obj.origin)
10406        if obj.os is not None:
10407            OperatingSystemWriter.write_one(obj.os, writer, 'os')
10408        if obj.payloads is not None:
10409            PayloadWriter.write_many(obj.payloads, writer, 'payload', 'payloads')
10410        if obj.placement_policy is not None:
10411            VmPlacementPolicyWriter.write_one(obj.placement_policy, writer, 'placement_policy')
10412        if obj.rng_device is not None:
10413            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
10414        if obj.run_once is not None:
10415            Writer.write_boolean(writer, 'run_once', obj.run_once)
10416        if obj.serial_number is not None:
10417            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
10418        if obj.small_icon is not None:
10419            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
10420        if obj.soundcard_enabled is not None:
10421            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
10422        if obj.sso is not None:
10423            SsoWriter.write_one(obj.sso, writer, 'sso')
10424        if obj.start_paused is not None:
10425            Writer.write_boolean(writer, 'start_paused', obj.start_paused)
10426        if obj.start_time is not None:
10427            Writer.write_date(writer, 'start_time', obj.start_time)
10428        if obj.stateless is not None:
10429            Writer.write_boolean(writer, 'stateless', obj.stateless)
10430        if obj.status is not None:
10431            Writer.write_string(writer, 'status', obj.status.value)
10432        if obj.status_detail is not None:
10433            Writer.write_string(writer, 'status_detail', obj.status_detail)
10434        if obj.stop_reason is not None:
10435            Writer.write_string(writer, 'stop_reason', obj.stop_reason)
10436        if obj.stop_time is not None:
10437            Writer.write_date(writer, 'stop_time', obj.stop_time)
10438        if obj.storage_error_resume_behaviour is not None:
10439            Writer.write_string(writer, 'storage_error_resume_behaviour', obj.storage_error_resume_behaviour.value)
10440        if obj.time_zone is not None:
10441            TimeZoneWriter.write_one(obj.time_zone, writer, 'time_zone')
10442        if obj.tpm_enabled is not None:
10443            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
10444        if obj.tunnel_migration is not None:
10445            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
10446        if obj.type is not None:
10447            Writer.write_string(writer, 'type', obj.type.value)
10448        if obj.usb is not None:
10449            UsbWriter.write_one(obj.usb, writer, 'usb')
10450        if obj.use_latest_template_version is not None:
10451            Writer.write_boolean(writer, 'use_latest_template_version', obj.use_latest_template_version)
10452        if obj.virtio_scsi is not None:
10453            VirtioScsiWriter.write_one(obj.virtio_scsi, writer, 'virtio_scsi')
10454        if obj.virtio_scsi_multi_queues is not None:
10455            Writer.write_integer(writer, 'virtio_scsi_multi_queues', obj.virtio_scsi_multi_queues)
10456        if obj.virtio_scsi_multi_queues_enabled is not None:
10457            Writer.write_boolean(writer, 'virtio_scsi_multi_queues_enabled', obj.virtio_scsi_multi_queues_enabled)
10458        if obj.affinity_labels is not None:
10459            AffinityLabelWriter.write_many(obj.affinity_labels, writer, 'affinity_label', 'affinity_labels')
10460        if obj.applications is not None:
10461            ApplicationWriter.write_many(obj.applications, writer, 'application', 'applications')
10462        if obj.cdroms is not None:
10463            CdromWriter.write_many(obj.cdroms, writer, 'cdrom', 'cdroms')
10464        if obj.cluster is not None:
10465            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
10466        if obj.cpu_profile is not None:
10467            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
10468        if obj.disk_attachments is not None:
10469            DiskAttachmentWriter.write_many(obj.disk_attachments, writer, 'disk_attachment', 'disk_attachments')
10470        if obj.dynamic_cpu is not None:
10471            DynamicCpuWriter.write_one(obj.dynamic_cpu, writer, 'dynamic_cpu')
10472        if obj.external_host_provider is not None:
10473            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
10474        if obj.floppies is not None:
10475            FloppyWriter.write_many(obj.floppies, writer, 'floppy', 'floppies')
10476        if obj.graphics_consoles is not None:
10477            GraphicsConsoleWriter.write_many(obj.graphics_consoles, writer, 'graphics_console', 'graphics_consoles')
10478        if obj.host is not None:
10479            HostWriter.write_one(obj.host, writer, 'host')
10480        if obj.host_devices is not None:
10481            HostDeviceWriter.write_many(obj.host_devices, writer, 'host_device', 'host_devices')
10482        if obj.instance_type is not None:
10483            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
10484        if obj.katello_errata is not None:
10485            KatelloErratumWriter.write_many(obj.katello_errata, writer, 'katello_erratum', 'katello_errata')
10486        if obj.mediated_devices is not None:
10487            VmMediatedDeviceWriter.write_many(obj.mediated_devices, writer, 'vm_mediated_device', 'mediated_devices')
10488        if obj.nics is not None:
10489            NicWriter.write_many(obj.nics, writer, 'nic', 'nics')
10490        if obj.numa_nodes is not None:
10491            NumaNodeWriter.write_many(obj.numa_nodes, writer, 'host_numa_node', 'host_numa_nodes')
10492        if obj.original_template is not None:
10493            TemplateWriter.write_one(obj.original_template, writer, 'original_template')
10494        if obj.permissions is not None:
10495            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
10496        if obj.quota is not None:
10497            QuotaWriter.write_one(obj.quota, writer, 'quota')
10498        if obj.reported_devices is not None:
10499            ReportedDeviceWriter.write_many(obj.reported_devices, writer, 'reported_device', 'reported_devices')
10500        if obj.sessions is not None:
10501            SessionWriter.write_many(obj.sessions, writer, 'session', 'sessions')
10502        if obj.snapshots is not None:
10503            SnapshotWriter.write_many(obj.snapshots, writer, 'snapshot', 'snapshots')
10504        if obj.statistics is not None:
10505            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
10506        if obj.storage_domain is not None:
10507            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
10508        if obj.tags is not None:
10509            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
10510        if obj.template is not None:
10511            TemplateWriter.write_one(obj.template, writer, 'template')
10512        if obj.vm_pool is not None:
10513            VmPoolWriter.write_one(obj.vm_pool, writer, 'vm_pool')
10514        if obj.watchdogs is not None:
10515            WatchdogWriter.write_many(obj.watchdogs, writer, 'watchdog', 'watchdogs')
10516        writer.write_end()
10517
10518    @staticmethod
10519    def write_many(objs, writer, singular=None, plural=None):
10520        if singular is None:
10521            singular = 'vm'
10522        if plural is None:
10523            plural = 'vms'
10524        writer.write_start(plural)
10525        if type(objs) == List:
10526            href = objs.href
10527            if href is not None:
10528                writer.write_attribute('href', href)
10529        for obj in objs:
10530            VmWriter.write_one(obj, writer, singular)
10531        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VmWriter()
10325    def __init__(self):
10326        super(VmWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10328    @staticmethod
10329    def write_one(obj, writer, singular=None):
10330        if singular is None:
10331            singular = 'vm'
10332        writer.write_start(singular)
10333        href = obj.href
10334        if href is not None:
10335            writer.write_attribute('href', href)
10336        if obj.id is not None:
10337            writer.write_attribute('id', obj.id)
10338        if obj.auto_pinning_policy is not None:
10339            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
10340        if obj.bios is not None:
10341            BiosWriter.write_one(obj.bios, writer, 'bios')
10342        if obj.comment is not None:
10343            Writer.write_string(writer, 'comment', obj.comment)
10344        if obj.console is not None:
10345            ConsoleWriter.write_one(obj.console, writer, 'console')
10346        if obj.cpu is not None:
10347            CpuWriter.write_one(obj.cpu, writer, 'cpu')
10348        if obj.cpu_pinning_policy is not None:
10349            Writer.write_string(writer, 'cpu_pinning_policy', obj.cpu_pinning_policy.value)
10350        if obj.cpu_shares is not None:
10351            Writer.write_integer(writer, 'cpu_shares', obj.cpu_shares)
10352        if obj.creation_time is not None:
10353            Writer.write_date(writer, 'creation_time', obj.creation_time)
10354        if obj.custom_compatibility_version is not None:
10355            VersionWriter.write_one(obj.custom_compatibility_version, writer, 'custom_compatibility_version')
10356        if obj.custom_cpu_model is not None:
10357            Writer.write_string(writer, 'custom_cpu_model', obj.custom_cpu_model)
10358        if obj.custom_emulated_machine is not None:
10359            Writer.write_string(writer, 'custom_emulated_machine', obj.custom_emulated_machine)
10360        if obj.custom_properties is not None:
10361            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
10362        if obj.delete_protected is not None:
10363            Writer.write_boolean(writer, 'delete_protected', obj.delete_protected)
10364        if obj.description is not None:
10365            Writer.write_string(writer, 'description', obj.description)
10366        if obj.display is not None:
10367            DisplayWriter.write_one(obj.display, writer, 'display')
10368        if obj.domain is not None:
10369            DomainWriter.write_one(obj.domain, writer, 'domain')
10370        if obj.fqdn is not None:
10371            Writer.write_string(writer, 'fqdn', obj.fqdn)
10372        if obj.guest_operating_system is not None:
10373            GuestOperatingSystemWriter.write_one(obj.guest_operating_system, writer, 'guest_operating_system')
10374        if obj.guest_time_zone is not None:
10375            TimeZoneWriter.write_one(obj.guest_time_zone, writer, 'guest_time_zone')
10376        if obj.has_illegal_images is not None:
10377            Writer.write_boolean(writer, 'has_illegal_images', obj.has_illegal_images)
10378        if obj.high_availability is not None:
10379            HighAvailabilityWriter.write_one(obj.high_availability, writer, 'high_availability')
10380        if obj.initialization is not None:
10381            InitializationWriter.write_one(obj.initialization, writer, 'initialization')
10382        if obj.io is not None:
10383            IoWriter.write_one(obj.io, writer, 'io')
10384        if obj.large_icon is not None:
10385            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
10386        if obj.lease is not None:
10387            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
10388        if obj.memory is not None:
10389            Writer.write_integer(writer, 'memory', obj.memory)
10390        if obj.memory_policy is not None:
10391            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
10392        if obj.migration is not None:
10393            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
10394        if obj.migration_downtime is not None:
10395            Writer.write_integer(writer, 'migration_downtime', obj.migration_downtime)
10396        if obj.multi_queues_enabled is not None:
10397            Writer.write_boolean(writer, 'multi_queues_enabled', obj.multi_queues_enabled)
10398        if obj.name is not None:
10399            Writer.write_string(writer, 'name', obj.name)
10400        if obj.next_run_configuration_exists is not None:
10401            Writer.write_boolean(writer, 'next_run_configuration_exists', obj.next_run_configuration_exists)
10402        if obj.numa_tune_mode is not None:
10403            Writer.write_string(writer, 'numa_tune_mode', obj.numa_tune_mode.value)
10404        if obj.origin is not None:
10405            Writer.write_string(writer, 'origin', obj.origin)
10406        if obj.os is not None:
10407            OperatingSystemWriter.write_one(obj.os, writer, 'os')
10408        if obj.payloads is not None:
10409            PayloadWriter.write_many(obj.payloads, writer, 'payload', 'payloads')
10410        if obj.placement_policy is not None:
10411            VmPlacementPolicyWriter.write_one(obj.placement_policy, writer, 'placement_policy')
10412        if obj.rng_device is not None:
10413            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
10414        if obj.run_once is not None:
10415            Writer.write_boolean(writer, 'run_once', obj.run_once)
10416        if obj.serial_number is not None:
10417            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
10418        if obj.small_icon is not None:
10419            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
10420        if obj.soundcard_enabled is not None:
10421            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
10422        if obj.sso is not None:
10423            SsoWriter.write_one(obj.sso, writer, 'sso')
10424        if obj.start_paused is not None:
10425            Writer.write_boolean(writer, 'start_paused', obj.start_paused)
10426        if obj.start_time is not None:
10427            Writer.write_date(writer, 'start_time', obj.start_time)
10428        if obj.stateless is not None:
10429            Writer.write_boolean(writer, 'stateless', obj.stateless)
10430        if obj.status is not None:
10431            Writer.write_string(writer, 'status', obj.status.value)
10432        if obj.status_detail is not None:
10433            Writer.write_string(writer, 'status_detail', obj.status_detail)
10434        if obj.stop_reason is not None:
10435            Writer.write_string(writer, 'stop_reason', obj.stop_reason)
10436        if obj.stop_time is not None:
10437            Writer.write_date(writer, 'stop_time', obj.stop_time)
10438        if obj.storage_error_resume_behaviour is not None:
10439            Writer.write_string(writer, 'storage_error_resume_behaviour', obj.storage_error_resume_behaviour.value)
10440        if obj.time_zone is not None:
10441            TimeZoneWriter.write_one(obj.time_zone, writer, 'time_zone')
10442        if obj.tpm_enabled is not None:
10443            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
10444        if obj.tunnel_migration is not None:
10445            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
10446        if obj.type is not None:
10447            Writer.write_string(writer, 'type', obj.type.value)
10448        if obj.usb is not None:
10449            UsbWriter.write_one(obj.usb, writer, 'usb')
10450        if obj.use_latest_template_version is not None:
10451            Writer.write_boolean(writer, 'use_latest_template_version', obj.use_latest_template_version)
10452        if obj.virtio_scsi is not None:
10453            VirtioScsiWriter.write_one(obj.virtio_scsi, writer, 'virtio_scsi')
10454        if obj.virtio_scsi_multi_queues is not None:
10455            Writer.write_integer(writer, 'virtio_scsi_multi_queues', obj.virtio_scsi_multi_queues)
10456        if obj.virtio_scsi_multi_queues_enabled is not None:
10457            Writer.write_boolean(writer, 'virtio_scsi_multi_queues_enabled', obj.virtio_scsi_multi_queues_enabled)
10458        if obj.affinity_labels is not None:
10459            AffinityLabelWriter.write_many(obj.affinity_labels, writer, 'affinity_label', 'affinity_labels')
10460        if obj.applications is not None:
10461            ApplicationWriter.write_many(obj.applications, writer, 'application', 'applications')
10462        if obj.cdroms is not None:
10463            CdromWriter.write_many(obj.cdroms, writer, 'cdrom', 'cdroms')
10464        if obj.cluster is not None:
10465            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
10466        if obj.cpu_profile is not None:
10467            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
10468        if obj.disk_attachments is not None:
10469            DiskAttachmentWriter.write_many(obj.disk_attachments, writer, 'disk_attachment', 'disk_attachments')
10470        if obj.dynamic_cpu is not None:
10471            DynamicCpuWriter.write_one(obj.dynamic_cpu, writer, 'dynamic_cpu')
10472        if obj.external_host_provider is not None:
10473            ExternalHostProviderWriter.write_one(obj.external_host_provider, writer, 'external_host_provider')
10474        if obj.floppies is not None:
10475            FloppyWriter.write_many(obj.floppies, writer, 'floppy', 'floppies')
10476        if obj.graphics_consoles is not None:
10477            GraphicsConsoleWriter.write_many(obj.graphics_consoles, writer, 'graphics_console', 'graphics_consoles')
10478        if obj.host is not None:
10479            HostWriter.write_one(obj.host, writer, 'host')
10480        if obj.host_devices is not None:
10481            HostDeviceWriter.write_many(obj.host_devices, writer, 'host_device', 'host_devices')
10482        if obj.instance_type is not None:
10483            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
10484        if obj.katello_errata is not None:
10485            KatelloErratumWriter.write_many(obj.katello_errata, writer, 'katello_erratum', 'katello_errata')
10486        if obj.mediated_devices is not None:
10487            VmMediatedDeviceWriter.write_many(obj.mediated_devices, writer, 'vm_mediated_device', 'mediated_devices')
10488        if obj.nics is not None:
10489            NicWriter.write_many(obj.nics, writer, 'nic', 'nics')
10490        if obj.numa_nodes is not None:
10491            NumaNodeWriter.write_many(obj.numa_nodes, writer, 'host_numa_node', 'host_numa_nodes')
10492        if obj.original_template is not None:
10493            TemplateWriter.write_one(obj.original_template, writer, 'original_template')
10494        if obj.permissions is not None:
10495            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
10496        if obj.quota is not None:
10497            QuotaWriter.write_one(obj.quota, writer, 'quota')
10498        if obj.reported_devices is not None:
10499            ReportedDeviceWriter.write_many(obj.reported_devices, writer, 'reported_device', 'reported_devices')
10500        if obj.sessions is not None:
10501            SessionWriter.write_many(obj.sessions, writer, 'session', 'sessions')
10502        if obj.snapshots is not None:
10503            SnapshotWriter.write_many(obj.snapshots, writer, 'snapshot', 'snapshots')
10504        if obj.statistics is not None:
10505            StatisticWriter.write_many(obj.statistics, writer, 'statistic', 'statistics')
10506        if obj.storage_domain is not None:
10507            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
10508        if obj.tags is not None:
10509            TagWriter.write_many(obj.tags, writer, 'tag', 'tags')
10510        if obj.template is not None:
10511            TemplateWriter.write_one(obj.template, writer, 'template')
10512        if obj.vm_pool is not None:
10513            VmPoolWriter.write_one(obj.vm_pool, writer, 'vm_pool')
10514        if obj.watchdogs is not None:
10515            WatchdogWriter.write_many(obj.watchdogs, writer, 'watchdog', 'watchdogs')
10516        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10518    @staticmethod
10519    def write_many(objs, writer, singular=None, plural=None):
10520        if singular is None:
10521            singular = 'vm'
10522        if plural is None:
10523            plural = 'vms'
10524        writer.write_start(plural)
10525        if type(objs) == List:
10526            href = objs.href
10527            if href is not None:
10528                writer.write_attribute('href', href)
10529        for obj in objs:
10530            VmWriter.write_one(obj, writer, singular)
10531        writer.write_end()
class VmBaseWriter(ovirtsdk4.writer.Writer):
10534class VmBaseWriter(Writer):
10535
10536    def __init__(self):
10537        super(VmBaseWriter, self).__init__()
10538
10539    @staticmethod
10540    def write_one(obj, writer, singular=None):
10541        if singular is None:
10542            singular = 'vm_base'
10543        writer.write_start(singular)
10544        href = obj.href
10545        if href is not None:
10546            writer.write_attribute('href', href)
10547        if obj.id is not None:
10548            writer.write_attribute('id', obj.id)
10549        if obj.auto_pinning_policy is not None:
10550            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
10551        if obj.bios is not None:
10552            BiosWriter.write_one(obj.bios, writer, 'bios')
10553        if obj.comment is not None:
10554            Writer.write_string(writer, 'comment', obj.comment)
10555        if obj.console is not None:
10556            ConsoleWriter.write_one(obj.console, writer, 'console')
10557        if obj.cpu is not None:
10558            CpuWriter.write_one(obj.cpu, writer, 'cpu')
10559        if obj.cpu_pinning_policy is not None:
10560            Writer.write_string(writer, 'cpu_pinning_policy', obj.cpu_pinning_policy.value)
10561        if obj.cpu_shares is not None:
10562            Writer.write_integer(writer, 'cpu_shares', obj.cpu_shares)
10563        if obj.creation_time is not None:
10564            Writer.write_date(writer, 'creation_time', obj.creation_time)
10565        if obj.custom_compatibility_version is not None:
10566            VersionWriter.write_one(obj.custom_compatibility_version, writer, 'custom_compatibility_version')
10567        if obj.custom_cpu_model is not None:
10568            Writer.write_string(writer, 'custom_cpu_model', obj.custom_cpu_model)
10569        if obj.custom_emulated_machine is not None:
10570            Writer.write_string(writer, 'custom_emulated_machine', obj.custom_emulated_machine)
10571        if obj.custom_properties is not None:
10572            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
10573        if obj.delete_protected is not None:
10574            Writer.write_boolean(writer, 'delete_protected', obj.delete_protected)
10575        if obj.description is not None:
10576            Writer.write_string(writer, 'description', obj.description)
10577        if obj.display is not None:
10578            DisplayWriter.write_one(obj.display, writer, 'display')
10579        if obj.domain is not None:
10580            DomainWriter.write_one(obj.domain, writer, 'domain')
10581        if obj.high_availability is not None:
10582            HighAvailabilityWriter.write_one(obj.high_availability, writer, 'high_availability')
10583        if obj.initialization is not None:
10584            InitializationWriter.write_one(obj.initialization, writer, 'initialization')
10585        if obj.io is not None:
10586            IoWriter.write_one(obj.io, writer, 'io')
10587        if obj.large_icon is not None:
10588            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
10589        if obj.lease is not None:
10590            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
10591        if obj.memory is not None:
10592            Writer.write_integer(writer, 'memory', obj.memory)
10593        if obj.memory_policy is not None:
10594            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
10595        if obj.migration is not None:
10596            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
10597        if obj.migration_downtime is not None:
10598            Writer.write_integer(writer, 'migration_downtime', obj.migration_downtime)
10599        if obj.multi_queues_enabled is not None:
10600            Writer.write_boolean(writer, 'multi_queues_enabled', obj.multi_queues_enabled)
10601        if obj.name is not None:
10602            Writer.write_string(writer, 'name', obj.name)
10603        if obj.origin is not None:
10604            Writer.write_string(writer, 'origin', obj.origin)
10605        if obj.os is not None:
10606            OperatingSystemWriter.write_one(obj.os, writer, 'os')
10607        if obj.placement_policy is not None:
10608            VmPlacementPolicyWriter.write_one(obj.placement_policy, writer, 'placement_policy')
10609        if obj.rng_device is not None:
10610            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
10611        if obj.serial_number is not None:
10612            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
10613        if obj.small_icon is not None:
10614            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
10615        if obj.soundcard_enabled is not None:
10616            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
10617        if obj.sso is not None:
10618            SsoWriter.write_one(obj.sso, writer, 'sso')
10619        if obj.start_paused is not None:
10620            Writer.write_boolean(writer, 'start_paused', obj.start_paused)
10621        if obj.stateless is not None:
10622            Writer.write_boolean(writer, 'stateless', obj.stateless)
10623        if obj.storage_error_resume_behaviour is not None:
10624            Writer.write_string(writer, 'storage_error_resume_behaviour', obj.storage_error_resume_behaviour.value)
10625        if obj.time_zone is not None:
10626            TimeZoneWriter.write_one(obj.time_zone, writer, 'time_zone')
10627        if obj.tpm_enabled is not None:
10628            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
10629        if obj.tunnel_migration is not None:
10630            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
10631        if obj.type is not None:
10632            Writer.write_string(writer, 'type', obj.type.value)
10633        if obj.usb is not None:
10634            UsbWriter.write_one(obj.usb, writer, 'usb')
10635        if obj.virtio_scsi is not None:
10636            VirtioScsiWriter.write_one(obj.virtio_scsi, writer, 'virtio_scsi')
10637        if obj.virtio_scsi_multi_queues is not None:
10638            Writer.write_integer(writer, 'virtio_scsi_multi_queues', obj.virtio_scsi_multi_queues)
10639        if obj.virtio_scsi_multi_queues_enabled is not None:
10640            Writer.write_boolean(writer, 'virtio_scsi_multi_queues_enabled', obj.virtio_scsi_multi_queues_enabled)
10641        if obj.cluster is not None:
10642            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
10643        if obj.cpu_profile is not None:
10644            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
10645        if obj.quota is not None:
10646            QuotaWriter.write_one(obj.quota, writer, 'quota')
10647        if obj.storage_domain is not None:
10648            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
10649        writer.write_end()
10650
10651    @staticmethod
10652    def write_many(objs, writer, singular=None, plural=None):
10653        if singular is None:
10654            singular = 'vm_base'
10655        if plural is None:
10656            plural = 'vm_bases'
10657        writer.write_start(plural)
10658        if type(objs) == List:
10659            href = objs.href
10660            if href is not None:
10661                writer.write_attribute('href', href)
10662        for obj in objs:
10663            VmBaseWriter.write_one(obj, writer, singular)
10664        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VmBaseWriter()
10536    def __init__(self):
10537        super(VmBaseWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10539    @staticmethod
10540    def write_one(obj, writer, singular=None):
10541        if singular is None:
10542            singular = 'vm_base'
10543        writer.write_start(singular)
10544        href = obj.href
10545        if href is not None:
10546            writer.write_attribute('href', href)
10547        if obj.id is not None:
10548            writer.write_attribute('id', obj.id)
10549        if obj.auto_pinning_policy is not None:
10550            Writer.write_string(writer, 'auto_pinning_policy', obj.auto_pinning_policy.value)
10551        if obj.bios is not None:
10552            BiosWriter.write_one(obj.bios, writer, 'bios')
10553        if obj.comment is not None:
10554            Writer.write_string(writer, 'comment', obj.comment)
10555        if obj.console is not None:
10556            ConsoleWriter.write_one(obj.console, writer, 'console')
10557        if obj.cpu is not None:
10558            CpuWriter.write_one(obj.cpu, writer, 'cpu')
10559        if obj.cpu_pinning_policy is not None:
10560            Writer.write_string(writer, 'cpu_pinning_policy', obj.cpu_pinning_policy.value)
10561        if obj.cpu_shares is not None:
10562            Writer.write_integer(writer, 'cpu_shares', obj.cpu_shares)
10563        if obj.creation_time is not None:
10564            Writer.write_date(writer, 'creation_time', obj.creation_time)
10565        if obj.custom_compatibility_version is not None:
10566            VersionWriter.write_one(obj.custom_compatibility_version, writer, 'custom_compatibility_version')
10567        if obj.custom_cpu_model is not None:
10568            Writer.write_string(writer, 'custom_cpu_model', obj.custom_cpu_model)
10569        if obj.custom_emulated_machine is not None:
10570            Writer.write_string(writer, 'custom_emulated_machine', obj.custom_emulated_machine)
10571        if obj.custom_properties is not None:
10572            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
10573        if obj.delete_protected is not None:
10574            Writer.write_boolean(writer, 'delete_protected', obj.delete_protected)
10575        if obj.description is not None:
10576            Writer.write_string(writer, 'description', obj.description)
10577        if obj.display is not None:
10578            DisplayWriter.write_one(obj.display, writer, 'display')
10579        if obj.domain is not None:
10580            DomainWriter.write_one(obj.domain, writer, 'domain')
10581        if obj.high_availability is not None:
10582            HighAvailabilityWriter.write_one(obj.high_availability, writer, 'high_availability')
10583        if obj.initialization is not None:
10584            InitializationWriter.write_one(obj.initialization, writer, 'initialization')
10585        if obj.io is not None:
10586            IoWriter.write_one(obj.io, writer, 'io')
10587        if obj.large_icon is not None:
10588            IconWriter.write_one(obj.large_icon, writer, 'large_icon')
10589        if obj.lease is not None:
10590            StorageDomainLeaseWriter.write_one(obj.lease, writer, 'lease')
10591        if obj.memory is not None:
10592            Writer.write_integer(writer, 'memory', obj.memory)
10593        if obj.memory_policy is not None:
10594            MemoryPolicyWriter.write_one(obj.memory_policy, writer, 'memory_policy')
10595        if obj.migration is not None:
10596            MigrationOptionsWriter.write_one(obj.migration, writer, 'migration')
10597        if obj.migration_downtime is not None:
10598            Writer.write_integer(writer, 'migration_downtime', obj.migration_downtime)
10599        if obj.multi_queues_enabled is not None:
10600            Writer.write_boolean(writer, 'multi_queues_enabled', obj.multi_queues_enabled)
10601        if obj.name is not None:
10602            Writer.write_string(writer, 'name', obj.name)
10603        if obj.origin is not None:
10604            Writer.write_string(writer, 'origin', obj.origin)
10605        if obj.os is not None:
10606            OperatingSystemWriter.write_one(obj.os, writer, 'os')
10607        if obj.placement_policy is not None:
10608            VmPlacementPolicyWriter.write_one(obj.placement_policy, writer, 'placement_policy')
10609        if obj.rng_device is not None:
10610            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
10611        if obj.serial_number is not None:
10612            SerialNumberWriter.write_one(obj.serial_number, writer, 'serial_number')
10613        if obj.small_icon is not None:
10614            IconWriter.write_one(obj.small_icon, writer, 'small_icon')
10615        if obj.soundcard_enabled is not None:
10616            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
10617        if obj.sso is not None:
10618            SsoWriter.write_one(obj.sso, writer, 'sso')
10619        if obj.start_paused is not None:
10620            Writer.write_boolean(writer, 'start_paused', obj.start_paused)
10621        if obj.stateless is not None:
10622            Writer.write_boolean(writer, 'stateless', obj.stateless)
10623        if obj.storage_error_resume_behaviour is not None:
10624            Writer.write_string(writer, 'storage_error_resume_behaviour', obj.storage_error_resume_behaviour.value)
10625        if obj.time_zone is not None:
10626            TimeZoneWriter.write_one(obj.time_zone, writer, 'time_zone')
10627        if obj.tpm_enabled is not None:
10628            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
10629        if obj.tunnel_migration is not None:
10630            Writer.write_boolean(writer, 'tunnel_migration', obj.tunnel_migration)
10631        if obj.type is not None:
10632            Writer.write_string(writer, 'type', obj.type.value)
10633        if obj.usb is not None:
10634            UsbWriter.write_one(obj.usb, writer, 'usb')
10635        if obj.virtio_scsi is not None:
10636            VirtioScsiWriter.write_one(obj.virtio_scsi, writer, 'virtio_scsi')
10637        if obj.virtio_scsi_multi_queues is not None:
10638            Writer.write_integer(writer, 'virtio_scsi_multi_queues', obj.virtio_scsi_multi_queues)
10639        if obj.virtio_scsi_multi_queues_enabled is not None:
10640            Writer.write_boolean(writer, 'virtio_scsi_multi_queues_enabled', obj.virtio_scsi_multi_queues_enabled)
10641        if obj.cluster is not None:
10642            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
10643        if obj.cpu_profile is not None:
10644            CpuProfileWriter.write_one(obj.cpu_profile, writer, 'cpu_profile')
10645        if obj.quota is not None:
10646            QuotaWriter.write_one(obj.quota, writer, 'quota')
10647        if obj.storage_domain is not None:
10648            StorageDomainWriter.write_one(obj.storage_domain, writer, 'storage_domain')
10649        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10651    @staticmethod
10652    def write_many(objs, writer, singular=None, plural=None):
10653        if singular is None:
10654            singular = 'vm_base'
10655        if plural is None:
10656            plural = 'vm_bases'
10657        writer.write_start(plural)
10658        if type(objs) == List:
10659            href = objs.href
10660            if href is not None:
10661                writer.write_attribute('href', href)
10662        for obj in objs:
10663            VmBaseWriter.write_one(obj, writer, singular)
10664        writer.write_end()
class VmMediatedDeviceWriter(ovirtsdk4.writer.Writer):
10667class VmMediatedDeviceWriter(Writer):
10668
10669    def __init__(self):
10670        super(VmMediatedDeviceWriter, self).__init__()
10671
10672    @staticmethod
10673    def write_one(obj, writer, singular=None):
10674        if singular is None:
10675            singular = 'vm_mediated_device'
10676        writer.write_start(singular)
10677        href = obj.href
10678        if href is not None:
10679            writer.write_attribute('href', href)
10680        if obj.id is not None:
10681            writer.write_attribute('id', obj.id)
10682        if obj.comment is not None:
10683            Writer.write_string(writer, 'comment', obj.comment)
10684        if obj.description is not None:
10685            Writer.write_string(writer, 'description', obj.description)
10686        if obj.name is not None:
10687            Writer.write_string(writer, 'name', obj.name)
10688        if obj.spec_params is not None:
10689            PropertyWriter.write_many(obj.spec_params, writer, 'property', 'spec_params')
10690        if obj.instance_type is not None:
10691            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
10692        if obj.template is not None:
10693            TemplateWriter.write_one(obj.template, writer, 'template')
10694        if obj.vm is not None:
10695            VmWriter.write_one(obj.vm, writer, 'vm')
10696        if obj.vms is not None:
10697            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
10698        writer.write_end()
10699
10700    @staticmethod
10701    def write_many(objs, writer, singular=None, plural=None):
10702        if singular is None:
10703            singular = 'vm_mediated_device'
10704        if plural is None:
10705            plural = 'vm_mediated_devices'
10706        writer.write_start(plural)
10707        if type(objs) == List:
10708            href = objs.href
10709            if href is not None:
10710                writer.write_attribute('href', href)
10711        for obj in objs:
10712            VmMediatedDeviceWriter.write_one(obj, writer, singular)
10713        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VmMediatedDeviceWriter()
10669    def __init__(self):
10670        super(VmMediatedDeviceWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10672    @staticmethod
10673    def write_one(obj, writer, singular=None):
10674        if singular is None:
10675            singular = 'vm_mediated_device'
10676        writer.write_start(singular)
10677        href = obj.href
10678        if href is not None:
10679            writer.write_attribute('href', href)
10680        if obj.id is not None:
10681            writer.write_attribute('id', obj.id)
10682        if obj.comment is not None:
10683            Writer.write_string(writer, 'comment', obj.comment)
10684        if obj.description is not None:
10685            Writer.write_string(writer, 'description', obj.description)
10686        if obj.name is not None:
10687            Writer.write_string(writer, 'name', obj.name)
10688        if obj.spec_params is not None:
10689            PropertyWriter.write_many(obj.spec_params, writer, 'property', 'spec_params')
10690        if obj.instance_type is not None:
10691            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
10692        if obj.template is not None:
10693            TemplateWriter.write_one(obj.template, writer, 'template')
10694        if obj.vm is not None:
10695            VmWriter.write_one(obj.vm, writer, 'vm')
10696        if obj.vms is not None:
10697            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
10698        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10700    @staticmethod
10701    def write_many(objs, writer, singular=None, plural=None):
10702        if singular is None:
10703            singular = 'vm_mediated_device'
10704        if plural is None:
10705            plural = 'vm_mediated_devices'
10706        writer.write_start(plural)
10707        if type(objs) == List:
10708            href = objs.href
10709            if href is not None:
10710                writer.write_attribute('href', href)
10711        for obj in objs:
10712            VmMediatedDeviceWriter.write_one(obj, writer, singular)
10713        writer.write_end()
class VmPlacementPolicyWriter(ovirtsdk4.writer.Writer):
10716class VmPlacementPolicyWriter(Writer):
10717
10718    def __init__(self):
10719        super(VmPlacementPolicyWriter, self).__init__()
10720
10721    @staticmethod
10722    def write_one(obj, writer, singular=None):
10723        if singular is None:
10724            singular = 'vm_placement_policy'
10725        writer.write_start(singular)
10726        href = obj.href
10727        if href is not None:
10728            writer.write_attribute('href', href)
10729        if obj.affinity is not None:
10730            Writer.write_string(writer, 'affinity', obj.affinity.value)
10731        if obj.hosts is not None:
10732            HostWriter.write_many(obj.hosts, writer, 'host', 'hosts')
10733        writer.write_end()
10734
10735    @staticmethod
10736    def write_many(objs, writer, singular=None, plural=None):
10737        if singular is None:
10738            singular = 'vm_placement_policy'
10739        if plural is None:
10740            plural = 'vm_placement_policies'
10741        writer.write_start(plural)
10742        if type(objs) == List:
10743            href = objs.href
10744            if href is not None:
10745                writer.write_attribute('href', href)
10746        for obj in objs:
10747            VmPlacementPolicyWriter.write_one(obj, writer, singular)
10748        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VmPlacementPolicyWriter()
10718    def __init__(self):
10719        super(VmPlacementPolicyWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10721    @staticmethod
10722    def write_one(obj, writer, singular=None):
10723        if singular is None:
10724            singular = 'vm_placement_policy'
10725        writer.write_start(singular)
10726        href = obj.href
10727        if href is not None:
10728            writer.write_attribute('href', href)
10729        if obj.affinity is not None:
10730            Writer.write_string(writer, 'affinity', obj.affinity.value)
10731        if obj.hosts is not None:
10732            HostWriter.write_many(obj.hosts, writer, 'host', 'hosts')
10733        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10735    @staticmethod
10736    def write_many(objs, writer, singular=None, plural=None):
10737        if singular is None:
10738            singular = 'vm_placement_policy'
10739        if plural is None:
10740            plural = 'vm_placement_policies'
10741        writer.write_start(plural)
10742        if type(objs) == List:
10743            href = objs.href
10744            if href is not None:
10745                writer.write_attribute('href', href)
10746        for obj in objs:
10747            VmPlacementPolicyWriter.write_one(obj, writer, singular)
10748        writer.write_end()
class VmPoolWriter(ovirtsdk4.writer.Writer):
10751class VmPoolWriter(Writer):
10752
10753    def __init__(self):
10754        super(VmPoolWriter, self).__init__()
10755
10756    @staticmethod
10757    def write_one(obj, writer, singular=None):
10758        if singular is None:
10759            singular = 'vm_pool'
10760        writer.write_start(singular)
10761        href = obj.href
10762        if href is not None:
10763            writer.write_attribute('href', href)
10764        if obj.id is not None:
10765            writer.write_attribute('id', obj.id)
10766        if obj.auto_storage_select is not None:
10767            Writer.write_boolean(writer, 'auto_storage_select', obj.auto_storage_select)
10768        if obj.comment is not None:
10769            Writer.write_string(writer, 'comment', obj.comment)
10770        if obj.description is not None:
10771            Writer.write_string(writer, 'description', obj.description)
10772        if obj.display is not None:
10773            DisplayWriter.write_one(obj.display, writer, 'display')
10774        if obj.max_user_vms is not None:
10775            Writer.write_integer(writer, 'max_user_vms', obj.max_user_vms)
10776        if obj.name is not None:
10777            Writer.write_string(writer, 'name', obj.name)
10778        if obj.prestarted_vms is not None:
10779            Writer.write_integer(writer, 'prestarted_vms', obj.prestarted_vms)
10780        if obj.rng_device is not None:
10781            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
10782        if obj.size is not None:
10783            Writer.write_integer(writer, 'size', obj.size)
10784        if obj.soundcard_enabled is not None:
10785            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
10786        if obj.stateful is not None:
10787            Writer.write_boolean(writer, 'stateful', obj.stateful)
10788        if obj.tpm_enabled is not None:
10789            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
10790        if obj.type is not None:
10791            Writer.write_string(writer, 'type', obj.type.value)
10792        if obj.use_latest_template_version is not None:
10793            Writer.write_boolean(writer, 'use_latest_template_version', obj.use_latest_template_version)
10794        if obj.cluster is not None:
10795            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
10796        if obj.instance_type is not None:
10797            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
10798        if obj.permissions is not None:
10799            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
10800        if obj.template is not None:
10801            TemplateWriter.write_one(obj.template, writer, 'template')
10802        if obj.vm is not None:
10803            VmWriter.write_one(obj.vm, writer, 'vm')
10804        writer.write_end()
10805
10806    @staticmethod
10807    def write_many(objs, writer, singular=None, plural=None):
10808        if singular is None:
10809            singular = 'vm_pool'
10810        if plural is None:
10811            plural = 'vm_pools'
10812        writer.write_start(plural)
10813        if type(objs) == List:
10814            href = objs.href
10815            if href is not None:
10816                writer.write_attribute('href', href)
10817        for obj in objs:
10818            VmPoolWriter.write_one(obj, writer, singular)
10819        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VmPoolWriter()
10753    def __init__(self):
10754        super(VmPoolWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10756    @staticmethod
10757    def write_one(obj, writer, singular=None):
10758        if singular is None:
10759            singular = 'vm_pool'
10760        writer.write_start(singular)
10761        href = obj.href
10762        if href is not None:
10763            writer.write_attribute('href', href)
10764        if obj.id is not None:
10765            writer.write_attribute('id', obj.id)
10766        if obj.auto_storage_select is not None:
10767            Writer.write_boolean(writer, 'auto_storage_select', obj.auto_storage_select)
10768        if obj.comment is not None:
10769            Writer.write_string(writer, 'comment', obj.comment)
10770        if obj.description is not None:
10771            Writer.write_string(writer, 'description', obj.description)
10772        if obj.display is not None:
10773            DisplayWriter.write_one(obj.display, writer, 'display')
10774        if obj.max_user_vms is not None:
10775            Writer.write_integer(writer, 'max_user_vms', obj.max_user_vms)
10776        if obj.name is not None:
10777            Writer.write_string(writer, 'name', obj.name)
10778        if obj.prestarted_vms is not None:
10779            Writer.write_integer(writer, 'prestarted_vms', obj.prestarted_vms)
10780        if obj.rng_device is not None:
10781            RngDeviceWriter.write_one(obj.rng_device, writer, 'rng_device')
10782        if obj.size is not None:
10783            Writer.write_integer(writer, 'size', obj.size)
10784        if obj.soundcard_enabled is not None:
10785            Writer.write_boolean(writer, 'soundcard_enabled', obj.soundcard_enabled)
10786        if obj.stateful is not None:
10787            Writer.write_boolean(writer, 'stateful', obj.stateful)
10788        if obj.tpm_enabled is not None:
10789            Writer.write_boolean(writer, 'tpm_enabled', obj.tpm_enabled)
10790        if obj.type is not None:
10791            Writer.write_string(writer, 'type', obj.type.value)
10792        if obj.use_latest_template_version is not None:
10793            Writer.write_boolean(writer, 'use_latest_template_version', obj.use_latest_template_version)
10794        if obj.cluster is not None:
10795            ClusterWriter.write_one(obj.cluster, writer, 'cluster')
10796        if obj.instance_type is not None:
10797            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
10798        if obj.permissions is not None:
10799            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
10800        if obj.template is not None:
10801            TemplateWriter.write_one(obj.template, writer, 'template')
10802        if obj.vm is not None:
10803            VmWriter.write_one(obj.vm, writer, 'vm')
10804        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10806    @staticmethod
10807    def write_many(objs, writer, singular=None, plural=None):
10808        if singular is None:
10809            singular = 'vm_pool'
10810        if plural is None:
10811            plural = 'vm_pools'
10812        writer.write_start(plural)
10813        if type(objs) == List:
10814            href = objs.href
10815            if href is not None:
10816                writer.write_attribute('href', href)
10817        for obj in objs:
10818            VmPoolWriter.write_one(obj, writer, singular)
10819        writer.write_end()
class VmSummaryWriter(ovirtsdk4.writer.Writer):
10822class VmSummaryWriter(Writer):
10823
10824    def __init__(self):
10825        super(VmSummaryWriter, self).__init__()
10826
10827    @staticmethod
10828    def write_one(obj, writer, singular=None):
10829        if singular is None:
10830            singular = 'vm_summary'
10831        writer.write_start(singular)
10832        href = obj.href
10833        if href is not None:
10834            writer.write_attribute('href', href)
10835        if obj.active is not None:
10836            Writer.write_integer(writer, 'active', obj.active)
10837        if obj.migrating is not None:
10838            Writer.write_integer(writer, 'migrating', obj.migrating)
10839        if obj.total is not None:
10840            Writer.write_integer(writer, 'total', obj.total)
10841        writer.write_end()
10842
10843    @staticmethod
10844    def write_many(objs, writer, singular=None, plural=None):
10845        if singular is None:
10846            singular = 'vm_summary'
10847        if plural is None:
10848            plural = 'vm_summaries'
10849        writer.write_start(plural)
10850        if type(objs) == List:
10851            href = objs.href
10852            if href is not None:
10853                writer.write_attribute('href', href)
10854        for obj in objs:
10855            VmSummaryWriter.write_one(obj, writer, singular)
10856        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VmSummaryWriter()
10824    def __init__(self):
10825        super(VmSummaryWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10827    @staticmethod
10828    def write_one(obj, writer, singular=None):
10829        if singular is None:
10830            singular = 'vm_summary'
10831        writer.write_start(singular)
10832        href = obj.href
10833        if href is not None:
10834            writer.write_attribute('href', href)
10835        if obj.active is not None:
10836            Writer.write_integer(writer, 'active', obj.active)
10837        if obj.migrating is not None:
10838            Writer.write_integer(writer, 'migrating', obj.migrating)
10839        if obj.total is not None:
10840            Writer.write_integer(writer, 'total', obj.total)
10841        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10843    @staticmethod
10844    def write_many(objs, writer, singular=None, plural=None):
10845        if singular is None:
10846            singular = 'vm_summary'
10847        if plural is None:
10848            plural = 'vm_summaries'
10849        writer.write_start(plural)
10850        if type(objs) == List:
10851            href = objs.href
10852            if href is not None:
10853                writer.write_attribute('href', href)
10854        for obj in objs:
10855            VmSummaryWriter.write_one(obj, writer, singular)
10856        writer.write_end()
class VnicPassThroughWriter(ovirtsdk4.writer.Writer):
10859class VnicPassThroughWriter(Writer):
10860
10861    def __init__(self):
10862        super(VnicPassThroughWriter, self).__init__()
10863
10864    @staticmethod
10865    def write_one(obj, writer, singular=None):
10866        if singular is None:
10867            singular = 'vnic_pass_through'
10868        writer.write_start(singular)
10869        href = obj.href
10870        if href is not None:
10871            writer.write_attribute('href', href)
10872        if obj.mode is not None:
10873            Writer.write_string(writer, 'mode', obj.mode.value)
10874        writer.write_end()
10875
10876    @staticmethod
10877    def write_many(objs, writer, singular=None, plural=None):
10878        if singular is None:
10879            singular = 'vnic_pass_through'
10880        if plural is None:
10881            plural = 'vnic_pass_throughs'
10882        writer.write_start(plural)
10883        if type(objs) == List:
10884            href = objs.href
10885            if href is not None:
10886                writer.write_attribute('href', href)
10887        for obj in objs:
10888            VnicPassThroughWriter.write_one(obj, writer, singular)
10889        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VnicPassThroughWriter()
10861    def __init__(self):
10862        super(VnicPassThroughWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10864    @staticmethod
10865    def write_one(obj, writer, singular=None):
10866        if singular is None:
10867            singular = 'vnic_pass_through'
10868        writer.write_start(singular)
10869        href = obj.href
10870        if href is not None:
10871            writer.write_attribute('href', href)
10872        if obj.mode is not None:
10873            Writer.write_string(writer, 'mode', obj.mode.value)
10874        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10876    @staticmethod
10877    def write_many(objs, writer, singular=None, plural=None):
10878        if singular is None:
10879            singular = 'vnic_pass_through'
10880        if plural is None:
10881            plural = 'vnic_pass_throughs'
10882        writer.write_start(plural)
10883        if type(objs) == List:
10884            href = objs.href
10885            if href is not None:
10886                writer.write_attribute('href', href)
10887        for obj in objs:
10888            VnicPassThroughWriter.write_one(obj, writer, singular)
10889        writer.write_end()
class VnicProfileWriter(ovirtsdk4.writer.Writer):
10892class VnicProfileWriter(Writer):
10893
10894    def __init__(self):
10895        super(VnicProfileWriter, self).__init__()
10896
10897    @staticmethod
10898    def write_one(obj, writer, singular=None):
10899        if singular is None:
10900            singular = 'vnic_profile'
10901        writer.write_start(singular)
10902        href = obj.href
10903        if href is not None:
10904            writer.write_attribute('href', href)
10905        if obj.id is not None:
10906            writer.write_attribute('id', obj.id)
10907        if obj.comment is not None:
10908            Writer.write_string(writer, 'comment', obj.comment)
10909        if obj.custom_properties is not None:
10910            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
10911        if obj.description is not None:
10912            Writer.write_string(writer, 'description', obj.description)
10913        if obj.migratable is not None:
10914            Writer.write_boolean(writer, 'migratable', obj.migratable)
10915        if obj.name is not None:
10916            Writer.write_string(writer, 'name', obj.name)
10917        if obj.pass_through is not None:
10918            VnicPassThroughWriter.write_one(obj.pass_through, writer, 'pass_through')
10919        if obj.port_mirroring is not None:
10920            Writer.write_boolean(writer, 'port_mirroring', obj.port_mirroring)
10921        if obj.failover is not None:
10922            VnicProfileWriter.write_one(obj.failover, writer, 'failover')
10923        if obj.network is not None:
10924            NetworkWriter.write_one(obj.network, writer, 'network')
10925        if obj.network_filter is not None:
10926            NetworkFilterWriter.write_one(obj.network_filter, writer, 'network_filter')
10927        if obj.permissions is not None:
10928            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
10929        if obj.qos is not None:
10930            QosWriter.write_one(obj.qos, writer, 'qos')
10931        writer.write_end()
10932
10933    @staticmethod
10934    def write_many(objs, writer, singular=None, plural=None):
10935        if singular is None:
10936            singular = 'vnic_profile'
10937        if plural is None:
10938            plural = 'vnic_profiles'
10939        writer.write_start(plural)
10940        if type(objs) == List:
10941            href = objs.href
10942            if href is not None:
10943                writer.write_attribute('href', href)
10944        for obj in objs:
10945            VnicProfileWriter.write_one(obj, writer, singular)
10946        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VnicProfileWriter()
10894    def __init__(self):
10895        super(VnicProfileWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10897    @staticmethod
10898    def write_one(obj, writer, singular=None):
10899        if singular is None:
10900            singular = 'vnic_profile'
10901        writer.write_start(singular)
10902        href = obj.href
10903        if href is not None:
10904            writer.write_attribute('href', href)
10905        if obj.id is not None:
10906            writer.write_attribute('id', obj.id)
10907        if obj.comment is not None:
10908            Writer.write_string(writer, 'comment', obj.comment)
10909        if obj.custom_properties is not None:
10910            CustomPropertyWriter.write_many(obj.custom_properties, writer, 'custom_property', 'custom_properties')
10911        if obj.description is not None:
10912            Writer.write_string(writer, 'description', obj.description)
10913        if obj.migratable is not None:
10914            Writer.write_boolean(writer, 'migratable', obj.migratable)
10915        if obj.name is not None:
10916            Writer.write_string(writer, 'name', obj.name)
10917        if obj.pass_through is not None:
10918            VnicPassThroughWriter.write_one(obj.pass_through, writer, 'pass_through')
10919        if obj.port_mirroring is not None:
10920            Writer.write_boolean(writer, 'port_mirroring', obj.port_mirroring)
10921        if obj.failover is not None:
10922            VnicProfileWriter.write_one(obj.failover, writer, 'failover')
10923        if obj.network is not None:
10924            NetworkWriter.write_one(obj.network, writer, 'network')
10925        if obj.network_filter is not None:
10926            NetworkFilterWriter.write_one(obj.network_filter, writer, 'network_filter')
10927        if obj.permissions is not None:
10928            PermissionWriter.write_many(obj.permissions, writer, 'permission', 'permissions')
10929        if obj.qos is not None:
10930            QosWriter.write_one(obj.qos, writer, 'qos')
10931        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10933    @staticmethod
10934    def write_many(objs, writer, singular=None, plural=None):
10935        if singular is None:
10936            singular = 'vnic_profile'
10937        if plural is None:
10938            plural = 'vnic_profiles'
10939        writer.write_start(plural)
10940        if type(objs) == List:
10941            href = objs.href
10942            if href is not None:
10943                writer.write_attribute('href', href)
10944        for obj in objs:
10945            VnicProfileWriter.write_one(obj, writer, singular)
10946        writer.write_end()
class VnicProfileMappingWriter(ovirtsdk4.writer.Writer):
10949class VnicProfileMappingWriter(Writer):
10950
10951    def __init__(self):
10952        super(VnicProfileMappingWriter, self).__init__()
10953
10954    @staticmethod
10955    def write_one(obj, writer, singular=None):
10956        if singular is None:
10957            singular = 'vnic_profile_mapping'
10958        writer.write_start(singular)
10959        href = obj.href
10960        if href is not None:
10961            writer.write_attribute('href', href)
10962        if obj.source_network_name is not None:
10963            Writer.write_string(writer, 'source_network_name', obj.source_network_name)
10964        if obj.source_network_profile_name is not None:
10965            Writer.write_string(writer, 'source_network_profile_name', obj.source_network_profile_name)
10966        if obj.target_vnic_profile is not None:
10967            VnicProfileWriter.write_one(obj.target_vnic_profile, writer, 'target_vnic_profile')
10968        writer.write_end()
10969
10970    @staticmethod
10971    def write_many(objs, writer, singular=None, plural=None):
10972        if singular is None:
10973            singular = 'vnic_profile_mapping'
10974        if plural is None:
10975            plural = 'vnic_profile_mappings'
10976        writer.write_start(plural)
10977        if type(objs) == List:
10978            href = objs.href
10979            if href is not None:
10980                writer.write_attribute('href', href)
10981        for obj in objs:
10982            VnicProfileMappingWriter.write_one(obj, writer, singular)
10983        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VnicProfileMappingWriter()
10951    def __init__(self):
10952        super(VnicProfileMappingWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10954    @staticmethod
10955    def write_one(obj, writer, singular=None):
10956        if singular is None:
10957            singular = 'vnic_profile_mapping'
10958        writer.write_start(singular)
10959        href = obj.href
10960        if href is not None:
10961            writer.write_attribute('href', href)
10962        if obj.source_network_name is not None:
10963            Writer.write_string(writer, 'source_network_name', obj.source_network_name)
10964        if obj.source_network_profile_name is not None:
10965            Writer.write_string(writer, 'source_network_profile_name', obj.source_network_profile_name)
10966        if obj.target_vnic_profile is not None:
10967            VnicProfileWriter.write_one(obj.target_vnic_profile, writer, 'target_vnic_profile')
10968        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
10970    @staticmethod
10971    def write_many(objs, writer, singular=None, plural=None):
10972        if singular is None:
10973            singular = 'vnic_profile_mapping'
10974        if plural is None:
10975            plural = 'vnic_profile_mappings'
10976        writer.write_start(plural)
10977        if type(objs) == List:
10978            href = objs.href
10979            if href is not None:
10980                writer.write_attribute('href', href)
10981        for obj in objs:
10982            VnicProfileMappingWriter.write_one(obj, writer, singular)
10983        writer.write_end()
class VolumeGroupWriter(ovirtsdk4.writer.Writer):
10986class VolumeGroupWriter(Writer):
10987
10988    def __init__(self):
10989        super(VolumeGroupWriter, self).__init__()
10990
10991    @staticmethod
10992    def write_one(obj, writer, singular=None):
10993        if singular is None:
10994            singular = 'volume_group'
10995        writer.write_start(singular)
10996        href = obj.href
10997        if href is not None:
10998            writer.write_attribute('href', href)
10999        if obj.id is not None:
11000            writer.write_attribute('id', obj.id)
11001        if obj.logical_units is not None:
11002            LogicalUnitWriter.write_many(obj.logical_units, writer, 'logical_unit', 'logical_units')
11003        if obj.name is not None:
11004            Writer.write_string(writer, 'name', obj.name)
11005        writer.write_end()
11006
11007    @staticmethod
11008    def write_many(objs, writer, singular=None, plural=None):
11009        if singular is None:
11010            singular = 'volume_group'
11011        if plural is None:
11012            plural = 'volume_groups'
11013        writer.write_start(plural)
11014        if type(objs) == List:
11015            href = objs.href
11016            if href is not None:
11017                writer.write_attribute('href', href)
11018        for obj in objs:
11019            VolumeGroupWriter.write_one(obj, writer, singular)
11020        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

VolumeGroupWriter()
10988    def __init__(self):
10989        super(VolumeGroupWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
10991    @staticmethod
10992    def write_one(obj, writer, singular=None):
10993        if singular is None:
10994            singular = 'volume_group'
10995        writer.write_start(singular)
10996        href = obj.href
10997        if href is not None:
10998            writer.write_attribute('href', href)
10999        if obj.id is not None:
11000            writer.write_attribute('id', obj.id)
11001        if obj.logical_units is not None:
11002            LogicalUnitWriter.write_many(obj.logical_units, writer, 'logical_unit', 'logical_units')
11003        if obj.name is not None:
11004            Writer.write_string(writer, 'name', obj.name)
11005        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
11007    @staticmethod
11008    def write_many(objs, writer, singular=None, plural=None):
11009        if singular is None:
11010            singular = 'volume_group'
11011        if plural is None:
11012            plural = 'volume_groups'
11013        writer.write_start(plural)
11014        if type(objs) == List:
11015            href = objs.href
11016            if href is not None:
11017                writer.write_attribute('href', href)
11018        for obj in objs:
11019            VolumeGroupWriter.write_one(obj, writer, singular)
11020        writer.write_end()
class WatchdogWriter(ovirtsdk4.writer.Writer):
11023class WatchdogWriter(Writer):
11024
11025    def __init__(self):
11026        super(WatchdogWriter, self).__init__()
11027
11028    @staticmethod
11029    def write_one(obj, writer, singular=None):
11030        if singular is None:
11031            singular = 'watchdog'
11032        writer.write_start(singular)
11033        href = obj.href
11034        if href is not None:
11035            writer.write_attribute('href', href)
11036        if obj.id is not None:
11037            writer.write_attribute('id', obj.id)
11038        if obj.action is not None:
11039            Writer.write_string(writer, 'action', obj.action.value)
11040        if obj.comment is not None:
11041            Writer.write_string(writer, 'comment', obj.comment)
11042        if obj.description is not None:
11043            Writer.write_string(writer, 'description', obj.description)
11044        if obj.model is not None:
11045            Writer.write_string(writer, 'model', obj.model.value)
11046        if obj.name is not None:
11047            Writer.write_string(writer, 'name', obj.name)
11048        if obj.instance_type is not None:
11049            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
11050        if obj.template is not None:
11051            TemplateWriter.write_one(obj.template, writer, 'template')
11052        if obj.vm is not None:
11053            VmWriter.write_one(obj.vm, writer, 'vm')
11054        if obj.vms is not None:
11055            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
11056        writer.write_end()
11057
11058    @staticmethod
11059    def write_many(objs, writer, singular=None, plural=None):
11060        if singular is None:
11061            singular = 'watchdog'
11062        if plural is None:
11063            plural = 'watchdogs'
11064        writer.write_start(plural)
11065        if type(objs) == List:
11066            href = objs.href
11067            if href is not None:
11068                writer.write_attribute('href', href)
11069        for obj in objs:
11070            WatchdogWriter.write_one(obj, writer, singular)
11071        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

WatchdogWriter()
11025    def __init__(self):
11026        super(WatchdogWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
11028    @staticmethod
11029    def write_one(obj, writer, singular=None):
11030        if singular is None:
11031            singular = 'watchdog'
11032        writer.write_start(singular)
11033        href = obj.href
11034        if href is not None:
11035            writer.write_attribute('href', href)
11036        if obj.id is not None:
11037            writer.write_attribute('id', obj.id)
11038        if obj.action is not None:
11039            Writer.write_string(writer, 'action', obj.action.value)
11040        if obj.comment is not None:
11041            Writer.write_string(writer, 'comment', obj.comment)
11042        if obj.description is not None:
11043            Writer.write_string(writer, 'description', obj.description)
11044        if obj.model is not None:
11045            Writer.write_string(writer, 'model', obj.model.value)
11046        if obj.name is not None:
11047            Writer.write_string(writer, 'name', obj.name)
11048        if obj.instance_type is not None:
11049            InstanceTypeWriter.write_one(obj.instance_type, writer, 'instance_type')
11050        if obj.template is not None:
11051            TemplateWriter.write_one(obj.template, writer, 'template')
11052        if obj.vm is not None:
11053            VmWriter.write_one(obj.vm, writer, 'vm')
11054        if obj.vms is not None:
11055            VmWriter.write_many(obj.vms, writer, 'vm', 'vms')
11056        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
11058    @staticmethod
11059    def write_many(objs, writer, singular=None, plural=None):
11060        if singular is None:
11061            singular = 'watchdog'
11062        if plural is None:
11063            plural = 'watchdogs'
11064        writer.write_start(plural)
11065        if type(objs) == List:
11066            href = objs.href
11067            if href is not None:
11068                writer.write_attribute('href', href)
11069        for obj in objs:
11070            WatchdogWriter.write_one(obj, writer, singular)
11071        writer.write_end()
class WeightWriter(ovirtsdk4.writer.Writer):
11074class WeightWriter(Writer):
11075
11076    def __init__(self):
11077        super(WeightWriter, self).__init__()
11078
11079    @staticmethod
11080    def write_one(obj, writer, singular=None):
11081        if singular is None:
11082            singular = 'weight'
11083        writer.write_start(singular)
11084        href = obj.href
11085        if href is not None:
11086            writer.write_attribute('href', href)
11087        if obj.id is not None:
11088            writer.write_attribute('id', obj.id)
11089        if obj.comment is not None:
11090            Writer.write_string(writer, 'comment', obj.comment)
11091        if obj.description is not None:
11092            Writer.write_string(writer, 'description', obj.description)
11093        if obj.factor is not None:
11094            Writer.write_integer(writer, 'factor', obj.factor)
11095        if obj.name is not None:
11096            Writer.write_string(writer, 'name', obj.name)
11097        if obj.scheduling_policy is not None:
11098            SchedulingPolicyWriter.write_one(obj.scheduling_policy, writer, 'scheduling_policy')
11099        if obj.scheduling_policy_unit is not None:
11100            SchedulingPolicyUnitWriter.write_one(obj.scheduling_policy_unit, writer, 'scheduling_policy_unit')
11101        writer.write_end()
11102
11103    @staticmethod
11104    def write_many(objs, writer, singular=None, plural=None):
11105        if singular is None:
11106            singular = 'weight'
11107        if plural is None:
11108            plural = 'weights'
11109        writer.write_start(plural)
11110        if type(objs) == List:
11111            href = objs.href
11112            if href is not None:
11113                writer.write_attribute('href', href)
11114        for obj in objs:
11115            WeightWriter.write_one(obj, writer, singular)
11116        writer.write_end()

This is the base class for all the writers of the SDK. It contains the utility methods used by all of them.

WeightWriter()
11076    def __init__(self):
11077        super(WeightWriter, self).__init__()
@staticmethod
def write_one(obj, writer, singular=None):
11079    @staticmethod
11080    def write_one(obj, writer, singular=None):
11081        if singular is None:
11082            singular = 'weight'
11083        writer.write_start(singular)
11084        href = obj.href
11085        if href is not None:
11086            writer.write_attribute('href', href)
11087        if obj.id is not None:
11088            writer.write_attribute('id', obj.id)
11089        if obj.comment is not None:
11090            Writer.write_string(writer, 'comment', obj.comment)
11091        if obj.description is not None:
11092            Writer.write_string(writer, 'description', obj.description)
11093        if obj.factor is not None:
11094            Writer.write_integer(writer, 'factor', obj.factor)
11095        if obj.name is not None:
11096            Writer.write_string(writer, 'name', obj.name)
11097        if obj.scheduling_policy is not None:
11098            SchedulingPolicyWriter.write_one(obj.scheduling_policy, writer, 'scheduling_policy')
11099        if obj.scheduling_policy_unit is not None:
11100            SchedulingPolicyUnitWriter.write_one(obj.scheduling_policy_unit, writer, 'scheduling_policy_unit')
11101        writer.write_end()
@staticmethod
def write_many(objs, writer, singular=None, plural=None):
11103    @staticmethod
11104    def write_many(objs, writer, singular=None, plural=None):
11105        if singular is None:
11106            singular = 'weight'
11107        if plural is None:
11108            plural = 'weights'
11109        writer.write_start(plural)
11110        if type(objs) == List:
11111            href = objs.href
11112            if href is not None:
11113                writer.write_attribute('href', href)
11114        for obj in objs:
11115            WeightWriter.write_one(obj, writer, singular)
11116        writer.write_end()